feat: add Docker Compose configuration for PostgreSQL and bot service
Some checks failed
Docker / build-and-push-image (push) Failing after 3m15s

This commit is contained in:
purofle 2025-06-03 01:51:40 +08:00
parent 19d5d75ffd
commit de8c434012
No known key found for this signature in database

30
compose.yml Normal file
View File

@ -0,0 +1,30 @@
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: