-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
135 lines (125 loc) · 2.95 KB
/
docker-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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
version: '3.8'
networks:
kong-net:
name: kong-net
driver: bridge
ipam:
config:
- subnet: 172.1.1.0/24
services:
postgres-db:
container_name: postgres-db
image: postgres:11-alpine
restart: unless-stopped
environment:
POSTGRES_USER: kong
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "kong"]
interval: 30s
timeout: 3s
retries: 5
volumes:
- ./data:/var/lib/postgresql/data
networks:
- kong-net
kong-migration:
container_name: kong-migration
image: kong:2.1.4-alpine
command: "kong migrations bootstrap"
networks:
- kong-net
restart: on-failure
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: postgres-db
KONG_PG_USER: kong
KONG_PG_PASSWORD: password
links:
- postgres-db
depends_on:
- postgres-db
kong:
container_name: kong
image: kong:2.1.4-alpine
restart: unless-stopped
networks:
kong-net:
ipv4_address: 172.1.1.40
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: postgres-db
KONG_PG_USER: kong
KONG_PG_PASSWORD: password
KONG_ADMIN_LISTEN: "0.0.0.0:8001, 0.0.0.0:8444 ssl"
KONG_DB_UPDATE_FREQUENCY: 1m
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_ERROR_LOG: /dev/stderr
depends_on:
- kong-migration
ports:
- "8001:8001"
- "8444:8444"
- "8000:8000"
- "8443:8443"
konga-prepare:
container_name: konga-prepare
image: pantsel/konga:0.14.9
command: "-c prepare -a postgres -u postgresql://kong:password@postgres-db:5432/konga_db"
networks:
- kong-net
restart: on-failure
links:
- postgres-db
depends_on:
- postgres-db
konga:
container_name: konga
image: pantsel/konga:0.14.9
restart: unless-stopped
networks:
- kong-net
environment:
DB_ADAPTER: postgres
DB_HOST: postgres-db
DB_USER: kong
DB_PASSWORD: password
DB_DATABASE: konga_db
# any string will OK for token
TOKEN_SECRET: iu7YDcPLiZkozQXzZ9kka3Ee1Vid5ZgQ
NODE_ENV: development
depends_on:
- konga-prepare
ports:
- "1338:1337"
categoria:
image: alexolirib/cadastro:latest
environment:
- CONTEXTO_APLICACAO_CONFIG=categoria
depends_on:
- konga
networks:
kong-net:
ipv4_address: 172.1.1.11
fornecedor:
image: alexolirib/cadastro:latest
environment:
- CONTEXTO_APLICACAO_CONFIG=fornecedor
depends_on:
- konga
networks:
kong-net:
ipv4_address: 172.1.1.12
produto:
image: alexolirib/cadastro:latest
environment:
- CONTEXTO_APLICACAO_CONFIG=produto
depends_on:
- konga
networks:
kong-net:
ipv4_address: 172.1.1.13