remake_bot/compose.yml
purofle de8c434012
Some checks failed
Docker / build-and-push-image (push) Failing after 3m15s
feat: add Docker Compose configuration for PostgreSQL and bot service
2025-06-03 01:56:00 +08:00

31 lines
672 B
YAML

services:
postgres:
image: postgres:17
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 114514
POSTGRES_DB: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
sbbot:
build: .
restart: always
environment:
TOKEN: ${BOT_TOKEN}
DATABASE_URL: postgresql://postgres:114514@postgres:5432/postgres?sslmode=disable
depends_on:
- postgres
volumes:
postgres_data: