55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
version: '3.9'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: partymix
|
|
POSTGRES_USER: partymix
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U partymix"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
backend:
|
|
build:
|
|
context: ./apps/backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
DB_USER: partymix
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
DB_NAME: partymix
|
|
GIN_MODE: release
|
|
PORT: 8080
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
ports:
|
|
- "8081:8080"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
web:
|
|
build:
|
|
context: ./apps/web
|
|
dockerfile: Dockerfile
|
|
args:
|
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080}
|
|
environment:
|
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8080}
|
|
ports:
|
|
- "3001:3000"
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|