diff --git a/docker-compose.yaml b/docker-compose.yaml index 3e4f3727..65a65470 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 @@ -41,4 +43,6 @@ services: volumes: campus-db-data: + driver: local + backend-storage: driver: local \ No newline at end of file diff --git a/server/Dockerfile b/server/Dockerfile index dad8bf1f..3e3c13ed 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -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