Skip to content

Commit

Permalink
storage not being persistent in docker (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm authored Sep 13, 2023
1 parent 6bbe130 commit fb46264
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
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 @@ -30,6 +30,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

0 comments on commit fb46264

Please sign in to comment.