Last active
October 22, 2020 03:05
-
-
Save lishulongVI/a0a61ba62ead7c839cc743a6fa7bff76 to your computer and use it in GitHub Desktop.
kong + konga + postgres docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.0" | |
services: | |
kong-database: | |
image: postgres:9.6 | |
environment: | |
- POSTGRES_DB=kong | |
- POSTGRES_USER=kong | |
- POSTGRES_PASSWORD=kong | |
volumes: | |
- ./postgre/postgresql:/var/lib/postgresql/data | |
networks: | |
- kong-net | |
ports: | |
- "5432:5432" | |
restart: always | |
kong: | |
image: kong:latest | |
links: | |
- kong-database:kong-database | |
restart: always | |
environment: | |
- KONG_DATABASE=postgres | |
- KONG_PG_HOST=kong-database | |
- KONG_PG_USER=kong | |
- KONG_PG_PASSWORD=kong | |
- KONG_CASSANDRA_CONTACT_POINTS=kong-database | |
- 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 | |
networks: | |
- kong-net | |
depends_on: | |
- kong-database | |
konga: | |
image: pantsel/konga | |
links: | |
- kong-database:kong-database | |
volumes: | |
- ./konga_data.data:/tmp/konga_data.data | |
environment: | |
- NODE_ENV=development | |
# - TOKEN_SECRET=abcde | |
- DB_ADAPTER=postgres | |
- DB_HOST=kong-database | |
- DB_PORT=5432 | |
- DB_USER=kong | |
- DB_PASSWORD=kong | |
- DB_DATABASE=postgres | |
- KONGA_SEED_USER_DATA_SOURCE_FILE=/tmp/konga_data.data | |
networks: | |
- kong-net | |
restart: always | |
ports: | |
- "1337:1337" | |
depends_on: | |
- kong-database | |
networks: | |
kong-net: | |
/konga_data.data | |
module.exports = [ | |
{ | |
"username": "myadmin", | |
"email": "myadmin@some.domain", | |
"firstName": "Peter", | |
"lastName": "Administrator", | |
"node_id": "http://10.249.246.221:8001", | |
"admin": true, | |
"active" : true, | |
"password": "somepassword" | |
}, | |
{ | |
"username": "otheruser", | |
"email": "otheruser@some.domain", | |
"firstName": "Joe", | |
"lastName": "Blogs", | |
"node_id": "http://10.249.246.221:8001", | |
"admin": false, | |
"active" : true, | |
"password": "anotherpassword" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
command: kong migrations bootstrap
kong 组件 指令需要执行一次,之后需要注视掉,不允许重复migrations 数据表