49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: meme-wrangler-db
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- POSTGRES_DB=${POSTGRES_DB:-meme_wrangler}
|
|
- POSTGRES_USER=${POSTGRES_USER:-meme}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-meme}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-meme} -d ${POSTGRES_DB:-meme_wrangler}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 5s
|
|
|
|
meme-wrangler:
|
|
build: .
|
|
container_name: meme-wrangler
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-}
|
|
- OWNER_ID=${OWNER_ID:-}
|
|
- CHANNEL_ID=${CHANNEL_ID:-}
|
|
- POSTGRES_DB=${POSTGRES_DB:-meme_wrangler}
|
|
- POSTGRES_USER=${POSTGRES_USER:-meme}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-meme}
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-meme}:${POSTGRES_PASSWORD:-meme}@postgres:5432/${POSTGRES_DB:-meme_wrangler}
|
|
- MEMEBOT_BACKUP_DIR=/app/backups
|
|
volumes:
|
|
- ./backups:/app/backups
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
volumes:
|
|
pgdata:
|