set state dir properly in container

This commit is contained in:
Jeffrey Paul 2025-12-31 15:58:35 -08:00
parent aebdd1b23e
commit f788a0dbf9

View File

@ -39,9 +39,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Create non-root user
RUN useradd -r -u 1000 -m routewatch
# Create state directory
RUN mkdir -p /var/lib/routewatch && chown routewatch:routewatch /var/lib/routewatch
RUN mkdir -p /var/lib/berlin.sneak.app.routewatch && chown routewatch:routewatch /var/lib/berlin.sneak.app.routewatch
RUN mkdir /app
WORKDIR /app
# Copy binary and source archive from builder
@ -53,8 +53,7 @@ RUN chown -R routewatch:routewatch /app
USER routewatch
# Default state directory
ENV ROUTEWATCH_STATE_DIR=/var/lib/routewatch
ENV XDG_DATA_HOME=/var/lib
# Expose HTTP port
EXPOSE 8080