Files
velox-bot/docker-compose.yml
T
FernandoJVideira 26e1d9b094 feat: update Docker configuration and environment handling
- Added PostgreSQL service to docker-compose.yml with health checks and persistent storage.
- Updated bot service to use environment variable substitution for database connection string.
- Upgraded Go version in Dockerfile to 1.26.1-alpine.
- Modified config loading to ignore missing .env file for better compatibility with Docker.
2026-03-18 14:08:21 +00:00

40 lines
911 B
YAML

version: "3.9"
services:
db:
image: postgres:16
container_name: velox-postgres
restart: unless-stopped
environment:
POSTGRES_USER: velox
POSTGRES_PASSWORD: velox_pwd
POSTGRES_DB: velox
ports:
- "5432:5432"
volumes:
- velox_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U velox -d velox"]
interval: 10s
timeout: 5s
retries: 5
bot:
build: .
container_name: velox-bot
restart: unless-stopped
env_file: .env
environment:
DB_HOST: ${DB_HOST:-postgres://velox:velox_pwd@db:5432/velox?sslmode=disable}
LAVALINK_HOST: ${LAVALINK_HOST:-ws://lavalink:2333}
LAVALINK_PASSWORD: ${LAVALINK_PASSWORD:-youshallnotpass}
depends_on:
db:
condition: service_healthy
networks:
- default
- lavalink
networks:
lavalink:
external: true