-
-
Notifications
You must be signed in to change notification settings - Fork 130
/
docker-compose.yaml
79 lines (72 loc) · 1.52 KB
/
docker-compose.yaml
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
77
78
79
services:
db:
image: postgres:latest
container_name: majoexe-db
restart: always
user: postgres
environment:
- POSTGRES_DB=majoexe
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
volumes:
- database:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- app_network
healthcheck:
test: ["CMD", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
container_name: majoexe-cache
restart: always
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
ports:
- "6379:6379"
networks:
- app_network
volumes:
- cache:/data
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
bot:
environment:
- NODE_ENV=production
- TOKEN=${TOKEN}
- CLIENT_ID=${CLIENT_ID}
# - DATABASE_URL=postgres://postgres:${DATABASE_PASSWORD}@db:5432/majoexe
# - DATABASE_URL_UNPOOLED=postgres://postgres:${DATABASE_PASSWORD}@db:5432/majoexe
- DATABASE_URL=${DATABASE_URL}
- DATABASE_URL_UNPOOLED=${DATABASE_URL_UNPOOLED}
- REDIS_URL=redis://default:${REDIS_PASSWORD}@redis:6379
# - REDIS_URL=${REDIS_URL}
- TOPGG_API_KEY=${TOPGG_API_KEY}
container_name: majoexe-bot
build:
context: .
dockerfile: ./apps/bot/Dockerfile
restart: always
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
database:
driver: local
cache:
driver: local