-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (58 loc) · 1.4 KB
/
docker-compose.yaml
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
version: '3.8'
services:
phantom-pg:
container_name: phantom-pg
image: postgres:15
ports:
- "5433:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=ms-user
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "ms-user"]
interval: 30s
timeout: 10s
retries: 5
start_period: 5s
phantom-ms-user:
container_name: phantom-ms-user
build:
context: "./ms-user"
dockerfile: "Dockerfile"
ports:
- "8001:8000"
environment:
- PHANTOM_DB_HOST=phantom-pg
- PHANTON_DB_PORT=5432
- PHANTOM_DB_USER=postgres
- PHANTOM_DB_PASSWORD=postgres
- PHANTOM_DB_NAME=ms-user
depends_on:
phantom-pg:
condition: service_healthy
phantom-ms-post:
container_name: phantom-ms-post
build:
context: "./ms-post"
dockerfile: "Dockerfile"
ports:
- "8002:8000"
environment:
- PHANTOM_DB_HOST=phantom-pg
- PHANTON_DB_PORT=5432
- PHANTOM_DB_USER=postgres
- PHANTOM_DB_PASSWORD=postgres
- PHANTOM_DB_NAME=ms-post
nginx:
image: nginx
container_name: phantom-nginx
ports:
- "80:80"
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf"
depends_on:
phantom-ms-user:
condition: service_started
phantom-ms-post:
condition: service_started