-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
55 lines (53 loc) · 1.11 KB
/
docker-compose.yaml
File metadata and controls
55 lines (53 loc) · 1.11 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"
networks:
kpo:
external: true
services:
db:
image: postgres:latest
network_mode: bridge
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: db
APP_DB_USER: docker
APP_DB_PASS: docker
healthcheck:
test: PGPASSWORD='root' psql -U root --command='SELECT 1' --dbname=db
interval: 1s
timeout: 2s
retries: 5
auth:
build: ./auth/
network_mode: bridge
ports:
- "8080:8080"
environment:
- DB_URL=postgresql://root:root@db/db?sslmode=disable
- PORT=8080
- JWT-SECRET=secret
restart: on-failure
depends_on:
db:
condition: service_healthy
links:
- db
order:
build: ./order/
network_mode: bridge
ports:
- "8081:8081"
environment:
- DB_URL=postgresql://root:root@db/db?sslmode=disable
- PORT=8081
- JWT-SECRET=secret
restart: on-failure
depends_on:
db:
condition: service_healthy
links:
- db