59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
|
|
name: dating-app
|
||
|
|
|
||
|
|
services:
|
||
|
|
postgres:
|
||
|
|
image: postgres:16-alpine
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
POSTGRES_USER: ${DB_USER:-postgres}
|
||
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
|
||
|
|
POSTGRES_DB: ${DB_NAME:-dating_app}
|
||
|
|
volumes:
|
||
|
|
- postgres_data:/var/lib/postgresql/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-dating_app}"]
|
||
|
|
interval: 5s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 10
|
||
|
|
|
||
|
|
backend:
|
||
|
|
build:
|
||
|
|
context: ./backend
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
restart: unless-stopped
|
||
|
|
depends_on:
|
||
|
|
postgres:
|
||
|
|
condition: service_healthy
|
||
|
|
env_file:
|
||
|
|
- ./backend/.env
|
||
|
|
environment:
|
||
|
|
DB_HOST: postgres
|
||
|
|
DB_PORT: 5432
|
||
|
|
TZ: Asia/Tehran
|
||
|
|
volumes:
|
||
|
|
- backend_uploads:/app/uploads
|
||
|
|
|
||
|
|
web:
|
||
|
|
build:
|
||
|
|
context: ./web
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
args:
|
||
|
|
NEXT_PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:8080/api/v1}
|
||
|
|
restart: unless-stopped
|
||
|
|
depends_on:
|
||
|
|
- backend
|
||
|
|
|
||
|
|
admin:
|
||
|
|
build:
|
||
|
|
context: ./admin
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
args:
|
||
|
|
NEXT_PUBLIC_API_URL: ${PUBLIC_API_URL:-http://localhost:8080/api/v1}
|
||
|
|
restart: unless-stopped
|
||
|
|
depends_on:
|
||
|
|
- backend
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
postgres_data:
|
||
|
|
backend_uploads:
|