Skip to content

Commit 6d823d8

Browse files
committed
Switch datastore to Postgres
Add Kong-Dashboard as part of the compose
1 parent 46aa390 commit 6d823d8

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

docker-compose.yml

+18-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
version: '2'
22

33
services:
4-
cassandra:
5-
image: cassandra:3
6-
container_name: cassandra-database
4+
postgres:
5+
image: postgres:9.4
6+
environment:
7+
- "POSTGRES_USER=kong"
8+
- "POSTGRES_DB=kong"
9+
container_name: postgres-db
710

811
kong:
912
image: kong:0.10.3
10-
# Cassandra takes a while to initialize so Kong will error out, ensure it restarts so that when Cassandra is ready
11-
# then Kong will also be up and ready to take requests
13+
# The database takes a while to initialize so Kong will error out, ensure it restarts so that when the database is
14+
# ready then Kong will also be up and ready to take requests
1215
restart: always
1316
container_name: kong-api-gateway
1417
# make use of the container-name DNS to reference the database
1518
environment:
16-
- "KONG_DATABASE=cassandra"
17-
- "KONG_CASSANDRA_CONTACT_POINTS=cassandra-database"
19+
- "KONG_DATABASE=postgres"
20+
- "KONG_PG_HOST=postgres-db"
1821
ports:
1922
- "8000:8000"
2023
- "8443:8443"
2124
- "8001:8001"
2225
- "7946:7946"
2326
- "7946:7946/udp"
2427
depends_on:
25-
- "cassandra"
28+
- "postgres"
29+
30+
kong-dashboard:
31+
image: pgbi/kong-dashboard:latest
32+
ports:
33+
- "8080:8080"
34+
depends_on:
35+
- "kong"

0 commit comments

Comments
 (0)