Skip to content

Commit

Permalink
Merge pull request #94 from mkuf/config-permissions
Browse files Browse the repository at this point in the history
Docker: set permissions for config directory
  • Loading branch information
Donkie authored Sep 3, 2023
2 parents 6f47fe0 + 9ced024 commit 2db9823
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 2db9823

Please sign in to comment.