Skip to content

Commit

Permalink
docker: set permissions for config directory and add volume directive
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuf committed Sep 1, 2023
1 parent 6f47fe0 commit 9ced024
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ LABEL org.opencontainers.image.licenses=MIT
RUN apk add --no-cache libstdc++

# Add local user so we don't run as root
RUN adduser -D app
RUN adduser -D app \
&& mkdir -p /home/app/.local/share/spoolman \
&& chown -R app:app /home/app/.local/share/spoolman

USER app

# Copy built client
Expand All @@ -58,5 +61,6 @@ ENV PYTHONPATH="/home/app/spoolman:${PYTHONPATH}"

# Run command
EXPOSE 8000
VOLUME ["/home/app/.local/share/spoolman"]
ENTRYPOINT ["uvicorn", "spoolman.main:app"]
CMD ["--host", "0.0.0.0", "--port", "8000"]

0 comments on commit 9ced024

Please sign in to comment.