2026-07-03 12:12:43 +00:00
|
|
|
version: "3.9"
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
environment:
|
2026-07-03 13:28:19 +00:00
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
2026-07-03 12:12:43 +00:00
|
|
|
POSTGRES_DB: freelancer_match
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
volumes:
|
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
2026-07-03 13:28:19 +00:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
2026-07-03 12:12:43 +00:00
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
2026-07-03 13:28:19 +00:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
build: ./backend
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql+asyncpg://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/freelancer_match
|
|
|
|
|
REDIS_URL: redis://redis:6379/0
|
|
|
|
|
SECRET_KEY: ${SECRET_KEY}
|
|
|
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
|
|
|
ports:
|
|
|
|
|
- "8000:8000"
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build: ./frontend
|
|
|
|
|
environment:
|
|
|
|
|
NEXT_PUBLIC_API_URL: http://backend:8000
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:3000"
|
|
|
|
|
depends_on:
|
|
|
|
|
- backend
|
2026-07-03 12:12:43 +00:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pgdata:
|