62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
services:
|
|
database:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-zyrarbot}
|
|
POSTGRES_USER: ${POSTGRES_USER:-zyrarbot}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-zyrarbot}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5432:5432"
|
|
discord-bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: dev
|
|
environment:
|
|
DISCORD_TOKEN: ${DISCORD_TOKEN}
|
|
GUILD_ID: ${GUILD_ID:-}
|
|
POSTGRES_DB: ${POSTGRES_DB:-zyrarbot}
|
|
POSTGRES_USER: ${POSTGRES_USER:-zyrarbot}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-zyrarbot}
|
|
POSTGRES_HOST: database
|
|
POSTGRES_PORT: 5432
|
|
PYTHONUNBUFFERED: 1
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
volumes:
|
|
- .:/app
|
|
- ./config:/app/config
|
|
- ./uploads:/app/uploads
|
|
- ./frontend/dist:/app/static
|
|
ports:
|
|
- "8000:8000"
|
|
restart: unless-stopped
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: frontend-deps
|
|
working_dir: /frontend
|
|
command:
|
|
- sh
|
|
- -c
|
|
- test -x node_modules/.bin/vite || npm ci; exec npx vite build --watch
|
|
volumes:
|
|
- ./frontend:/frontend
|
|
environment:
|
|
VITE_BACKEND_URL: http://discord-bot:8000
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|