bilhej/docker-compose.prod.yml
Joakim Mörling b27b1395f7 Pass SWISH_NUMBER to production backend container.
Payment instructions need the merchant Swish number from environment
variables, consistent with dev compose.
2026-05-21 14:49:50 +02:00

57 lines
1.4 KiB
YAML

services:
postgres:
image: postgres:16
container_name: bilhej-postgres-prod
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- pgdata-prod:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
backend:
build:
dockerfile: docker/backend.prod.Dockerfile
context: .
container_name: bilhej-backend-prod
environment:
SPRING_PROFILES_ACTIVE: docker
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
STRIPE_PRICE_ID: ${STRIPE_PRICE_ID}
SWISH_NUMBER: ${SWISH_NUMBER}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
frontend:
build:
dockerfile: docker/frontend.prod.Dockerfile
context: .
container_name: bilhej-frontend-prod
ports:
- "3001:80"
depends_on:
- backend
networks:
- default
- web
restart: unless-stopped
volumes:
pgdata-prod:
networks:
web:
external: true