-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (76 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
81 lines (76 loc) · 1.64 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
77
78
79
80
81
version: '3'
services:
web:
container_name: benji-web
build:
context: .
dockerfile: ./apps/web/Dockerfile
args:
NEXT_PUBLIC_CLIENT_URL: '${PUBLIC_CLIENT_URL}'
NEXT_PUBLIC_API_URL: '${PUBLIC_API_URL}'
restart: always
ports:
- 3000:3000
networks:
- benji_network
depends_on:
- pocketbase
- redis
- bot
bot:
container_name: benji-bot
build:
context: .
dockerfile: ./apps/bot/Dockerfile
restart: always
ports:
- 3001:3001
environment:
- API_HOSTNAME=benji-bot
- API_PORT=3001
- POCKETBASE_BASE_URL=http://benji-db:3002
- REDIS_HOSTNAME=benji-redis
- REDIS_PORT=6379
networks:
- benji_network
env_file:
- .env
depends_on:
- pocketbase
- redis
pocketbase:
container_name: benji-db
build:
context: .
dockerfile: ./apps/db/Dockerfile
restart: always
ports:
- 3002:3002
networks:
- benji_network
volumes:
- ./data/pocketbase:/pb/pb_data
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:3002/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
redis:
container_name: benji-redis
image: redis/redis-stack
restart: always
ports:
- 3003:6379
- 3004:8001
networks:
- benji_network
volumes:
- ./data/redis:/data
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 3
# Allow containers to communicate using their container name as a hostname
networks:
benji_network: