-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample.compose.yml
49 lines (49 loc) · 1001 Bytes
/
example.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
services:
skymoth:
depends_on:
db:
condition: service_healthy
build: .
restart: always
env_file: .env
environment:
- POSTGRES_HOST=db
ports:
- "3000:3000"
links:
- db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 1m
timeout: 5s
start_period: 2m
start_interval: 5s
retries: 60
skymoth-scheduler:
depends_on:
db:
condition: service_healthy
skymoth:
condition: service_healthy
build: .
restart: always
env_file: .env
environment:
- POSTGRES_HOST=db
links:
- db
command:
- /bin/sh
- -c
- npm run start:scheduler
db:
image: postgres
restart: unless-stopped
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 1s
retries: 60
volumes:
- /var/lib/skymoth/pgdata:/var/lib/postgresql/data