-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
60 lines (58 loc) · 1.55 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
version: "3.9"
services:
kong-gateway:
build: .
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: database
KONG_PG_PORT: 5432
KONG_PG_USER: kong
KONG_PG_PASSWORD: kongpass
KONG_PG_DATABASE: kong
KONG_PLUGINS: "bundled,hello"
KONG_PLUGINSERVER_NAMES: hello
KONG_PLUGINSERVER_HELLO_START_CMD: /kong/hello
KONG_PLUGINSERVER_HELLO_QUERY_CMD: /kong/hello -dump
KONG_PROXY_ACCESS_LOG: /dev/stdout
KONG_ADMIN_ACCESS_LOG: /dev/stdout
KONG_PROXY_ERROR_LOG: /dev/stderr
KONG_ADMIN_ERROR_LOG: /dev/stderr
KONG_ADMIN_LISTEN: "0.0.0.0:8001, 0.0.0.0:8444 ssl"
ports:
- "8000:8000"
- "8443:8443"
- "8001:8001"
- "8444:8444"
depends_on:
database:
condition: service_healthy
init_db:
condition: service_completed_successfully
init_db:
build: .
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: database
KONG_PG_PORT: 5432
KONG_PG_USER: kong
KONG_PG_PASSWORD: kongpass
KONG_PG_DATABASE: kong
command: kong migrations bootstrap
depends_on:
database:
condition: service_healthy
database:
image: postgres:15
environment:
POSTGRES_USER: kong
POSTGRES_PASSWORD: kongpass
POSTGRES_DB: kong
PGUSER: kong # Usuario a ser usado pelo pg_isready
PGPASSWORD: kongpass # Senha a ser usada pelo pg_isready
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5