-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
83 lines (79 loc) · 1.71 KB
/
compose.yml
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
82
83
version: "3.9"
name: "chat-ting"
services:
postgres:
image: postgres:alpine
restart: always
env_file: .env
environment:
POSTGRES_USER: "${USERNAME}"
POSTGRES_PASSWORD: "${PASSWORD}"
POSTGRES_DB: "${DATABASE}"
ports:
- "${PORT}:5432"
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
restart: always
container_name: redis-1
ports:
- ${RPORT}:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 5
syncing-service:
env_file: .env
environment:
- USERNAME=${USERNAME}
- PASSWORD=${PASSWORD}
- DATABASE=${DATABASE}
- HOST=${HOST}
- DIALECT=${DIALECT}
- PORT=${PORT}
- RPORT=${RPORT}
- RHOST=${RHOST}
build: ./syncingService
ports:
- 3001:3001
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "./dist/healthcheck.js"]
interval: 300s
timeout: 10s
retries: 5
start_period: 30s
chat-service:
env_file: .env
environment:
- USERNAME=${USERNAME}
- PASSWORD=${PASSWORD}
- DATABASE=${DATABASE}
- HOST=${HOST}
- DIALECT=${DIALECT}
- PORT=${PORT}
- RPORT=${RPORT}
- RHOST=${RHOST}
- SECRET=${SECRET}
build: ./chatService
ports:
- 3000:3000
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
postgres:
driver: local