-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
services:
db:
image: postgres:16-alpine
restart: unless-stopped
labels:
autoheal: "true"
environment:
POSTGRES_USER: livid
POSTGRES_PASSWORD: livid
POSTGRES_DB: livid
ports:
- "15432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U livid -d livid"]
interval: 5s
timeout: 3s
retries: 10
start_period: 5s
bot:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DISCORD_BOT_TOKEN: ${DISCORD_BOT_TOKEN}
DISCORD_APPLICATION_ID: ${DISCORD_APPLICATION_ID}
DISCORD_GUILD_ID: ${DISCORD_GUILD_ID}
DATABASE_URL: postgres://livid:livid@db:5432/livid?sslmode=disable
LOG_FORMAT: "json"
LOG_FILE_ENABLED: "true"
LOG_FILE_PATH: /var/log/livid-bot/bot.log
LOG_FILE_MAX_SIZE_MB: "10"
LOG_FILE_MAX_BACKUPS: "900"
LOG_FILE_MAX_AGE_DAYS: "730"
LOG_FILE_COMPRESS: "true"
volumes:
- ./logs:/var/log/livid-bot
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
autoheal:
image: willfarrell/autoheal:latest
restart: always
environment:
AUTOHEAL_CONTAINER_LABEL: autoheal
AUTOHEAL_INTERVAL: 10
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
pgdata: