yaejunyang/docker-compose-example.yml

45 lines
1.2 KiB
YAML

networks:
discord-bot-internal:
internal: true
discord-bot-external:
internal: false
services:
discord-bot:
build: .
container_name: discord_bot
restart: unless-stopped
networks:
- discord-bot-internal
- discord-bot-external
environment:
SUPERTONIC_API_URL: "http://discord-supertonic"
DISCORD_TOKEN: "${DISCORD_TOKEN}"
APPLICATION_ID: "${APPLICATION_ID}"
TYPECAST_TOKEN: "${TYPECAST_TOKEN}"
DATABASE_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@discord-db:5432/${POSTGRES_DB}?schema=public"
volumes:
- ./cache:/app/cache
discord-db:
container_name: discord-db
image: postgres:17
restart: unless-stopped
networks:
- discord-bot-internal
volumes:
- ./db:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_DB: "${POSTGRES_DB}"
discord-supertonic:
build: crates/yaejuyang-supertonic
command: /app/yaejuyang-supertonic
container_name: "discord-supertonic"
networks:
- discord-bot-internal
environment:
SUPERTONIC_WORKERS: "1"
ENABLED_BACKENDS: ""
WEBGPU_DEVICE_ID: "0"
RUST_LOG: "info,ort=warn"