-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
78 lines (72 loc) · 1.59 KB
/
docker-compose.yaml
File metadata and controls
78 lines (72 loc) · 1.59 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
services:
postgres:
container_name: snappchat-db
image: postgres:17.2
restart: always
env_file:
- ./server/.env
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- snappchat-db-volume:/var/lib/postgresql/data
networks:
- snappchat-server
redis:
container_name: snappchat-redis
image: redis/redis-stack:7.4.0-v2
restart: always
ports:
- "8001:8001" # RedisInsight web UI
env_file:
- ./server/.env
volumes:
- snappchat-redis-volume:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 5
networks:
- snappchat-server
nats:
container_name: snappchat-nats
image: nats:2.9-alpine
ports:
- "4222:4222"
- "3000:3000" # for WebSocket connections
env_file:
- ./server/.env
command: [ "--store_dir", "/data", "-c", "/etc/nats/nats.conf" ]
volumes:
- snappchat-nats-volume:/data
- ./server/nats.conf:/etc/nats/nats.conf:ro
networks:
- snappchat-server
server:
container_name: snappchat-server
build:
context: ./server
dockerfile: Dockerfile
env_file:
- ./server/.env
restart: always
ports:
- "8080:8080"
depends_on:
- postgres
- redis
- nats
networks:
- snappchat-server
networks:
snappchat-server:
driver: bridge
snappchat-client:
driver: bridge
volumes:
snappchat-db-volume:
snappchat-redis-volume:
snappchat-nats-volume: