47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: treasure_trails_db
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: treasure_trails
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: treasure_trails_backend
|
|
environment:
|
|
DATABASE_URL: postgresql://postgres:postgres@db:5432/treasure_trails?schema=public
|
|
JWT_SECRET: treasure-trails-jwt-secret-change-in-production
|
|
PORT: 3001
|
|
ports:
|
|
- "3001:3001"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./backend/uploads:/app/uploads
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: treasure_trails_frontend
|
|
ports:
|
|
- "5173:5173"
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
postgres_data:
|