feat(docker): add Firebase credentials volume to Docker Compose for OAuth integration

This commit is contained in:
Nik Afiq 2025-12-10 19:37:11 +09:00
parent 8a549504a4
commit 8b268640a5
3 changed files with 9 additions and 2 deletions

1
.gitignore vendored
View File

@ -4,4 +4,5 @@
*.gocache
*.exe
*/dist
*/secrets
*/node_modules

View File

@ -25,8 +25,10 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
FROM alpine:3.20
# minimal tools for healthcheck + TLS roots + timezone
RUN apk add --no-cache ca-certificates tzdata curl && \
adduser -D -H -u 10001 app
adduser -D -H -u 10001 app && \
mkdir -p /home/app && chown app:app /home/app
USER app
ENV HOME=/home/app
WORKDIR /app
COPY --from=builder /out/server /app/server

View File

@ -65,6 +65,8 @@ services:
entrypoint: ["/app/migrate"]
env_file:
- ./.env
volumes:
- ./backend/secrets/firebase_credentials.json:/secrets/firebase_credentials.json:ro
depends_on:
db:
condition: service_healthy
@ -83,6 +85,8 @@ services:
condition: service_completed_successfully
expose:
- "8082"
volumes:
- ./backend/secrets/firebase_credentials.json:/secrets/firebase_credentials.json:ro
restart: unless-stopped
networks: [internal]
healthcheck: