-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver-docker-compose.yml
More file actions
55 lines (50 loc) · 1.15 KB
/
Copy pathserver-docker-compose.yml
File metadata and controls
55 lines (50 loc) · 1.15 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
version: "3.8"
services:
snapp-chat-server:
container_name: snapp-chat
restart: on-failure
build:
context: ./src/server
dockerfile: Dockerfile
volumes:
- ./src/server/config.json:/app/config.json:ro
ports:
- "8080:8080"
networks:
- app-network
command: ["./server" ,"--config" ,"/app/config.json"]
postgres:
container_name: snapp-chat-database
image: postgres:13-alpine
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${PG_USERNAME}
POSTGRES_PASSWORD: ${PG_PASSWORD}
POSTGRES_DB: snapp_chat
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_USERNAME}"]
interval: 10s
timeout: 10s
retries: 5
nats:
container_name: snapp-chat-nats
image: nats:latest
ports:
- "4222:4222"
volumes:
- ./nats-server.conf:/etc/nats/nats-server.conf
networks:
- app-network
command: ["-c", "/etc/nats/nats-server.conf"]
networks:
app-network:
driver: bridge
volumes:
postgres_data:
nats_data: