-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 2.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (72 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
services:
bot:
build: .
container_name: titanbot
restart: unless-stopped
env_file:
- .env
environment:
- NODE_ENV=production
- DISCORD_TOKEN=${DISCORD_TOKEN}
- CLIENT_ID=${CLIENT_ID}
- GUILD_ID=${GUILD_ID}
- DATABASE_URL=postgres://${POSTGRES_USER:-titanbot}:${POSTGRES_PASSWORD:-password}@db:5432/${POSTGRES_DB:-titanbot}
- POSTGRES_URL=postgres://${POSTGRES_USER:-titanbot}:${POSTGRES_PASSWORD:-password}@db:5432/${POSTGRES_DB:-titanbot}
- POSTGRES_HOST=db
- POSTGRES_PORT=5432
- POSTGRES_DB=${POSTGRES_DB:-titanbot}
- POSTGRES_USER=${POSTGRES_USER:-titanbot}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_SSL=false
- AUTO_MIGRATE=true
- LOG_LEVEL=${LOG_LEVEL:-warn}
- LAVALINK_NODES_FILE=lavalink/nodes.json
- PORT=3000
- WEB_HOST=0.0.0.0
ports:
- "${PORT:-3000}:3000"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
networks:
- titan-network
lavalink:
profiles:
- local-lavalink
image: ghcr.io/lavalink-devs/lavalink:4
container_name: titanbot-lavalink
restart: unless-stopped
environment:
- LAVALINK_PASSWORD=${LAVALINK_PASSWORD:-youshallnotpass}
volumes:
- ./lavalink/application.yml:/opt/Lavalink/application.yml
networks:
- titan-network
db:
image: postgres:15-alpine
container_name: titanbot-db
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER:-titanbot}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_DB=${POSTGRES_DB:-titanbot}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
networks:
- titan-network
networks:
titan-network:
driver: bridge
volumes:
postgres_data: