44 lines
1.1 KiB
YAML
44 lines
1.1 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
|
|
discord-bot:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: prod
|
|
container_name: zyrarbot
|
|
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:
|
|
- ./config:/app/config
|
|
- ./uploads:/app/uploads
|
|
ports:
|
|
- "80:8000"
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|