57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: basil-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: basil
|
|
POSTGRES_PASSWORD: basil
|
|
POSTGRES_DB: basil
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U basil"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: packages/api/Dockerfile
|
|
container_name: basil-api
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3001
|
|
DATABASE_URL: postgresql://basil:basil@postgres:5432/basil?schema=public
|
|
STORAGE_TYPE: local
|
|
LOCAL_STORAGE_PATH: /app/uploads
|
|
CORS_ORIGIN: http://localhost:5173
|
|
volumes:
|
|
- uploads_data:/app/uploads
|
|
ports:
|
|
- "3001:3001"
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: packages/web/Dockerfile
|
|
container_name: basil-web
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- api
|
|
ports:
|
|
- "5173:80"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
uploads_data:
|