feat: add Docker support and bot configuration

- Introduced Dockerfile for building the bot application using Go.
- Added .dockerignore to exclude unnecessary files from the Docker context.
- Updated docker-compose.yml to define the bot service and its dependencies, including environment variables for database and Lavalink configuration.
- Modified internal configuration to streamline environment variable handling.
This commit is contained in:
2026-03-18 13:39:31 +00:00
parent 1b47bd13a3
commit 461f8435c0
4 changed files with 50 additions and 26 deletions
+16 -17
View File
@@ -1,23 +1,22 @@
version: "3.9"
services:
db:
image: postgres:16
container_name: velox-postgres
bot:
build: .
container_name: velox-bot
restart: unless-stopped
env_file: .env
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
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
volumes:
velox_pgdata:
networks:
lavalink:
external: true