Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:storage not being persistent in docker-compose #202

Merged
merged 2 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ services:
- APNS_TEAM_ID=${APNS_TEAM_ID}
- APNS_P8_FILE_PATH=${APNS_P8_FILE_PATH}
volumes:
- backend-storage:/Storage
- ./apns_auth_key.p8:${APNS_P8_FILE_PATH}
user: 1000:3000
depends_on:
db:
condition: service_healthy
Expand All @@ -41,4 +43,6 @@ services:

volumes:
campus-db-data:
driver: local
backend-storage:
driver: local
5 changes: 5 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ COPY --from=builder /backend /backend
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /etc/passwd /etc/passwd

# make sure that /Storage is mounted with the correct access permissions even in docker-compose
RUN mkdir /Storage
RUN chown appuser /Storage
VOLUME /Storage

# Use an unprivileged user
USER appuser

Expand Down
Loading