Add ports mapping 3001:80 to the prod frontend service so the application is accessible from the server at http://srvr.nu:3001 for testing before DNS is pointed to bilhej.se. Backend remains internal-only (no host port).
56 lines
1.3 KiB
YAML
56 lines
1.3 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}
|
|
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
|