mysql backup
This commit is contained in:
94
docker-compose-3.129/kong/docker-compose.yml
Normal file
94
docker-compose-3.129/kong/docker-compose.yml
Normal file
@ -0,0 +1,94 @@
|
||||
version: '2'
|
||||
networks:
|
||||
kong-net:
|
||||
driver: bridge
|
||||
services:
|
||||
kong-database:
|
||||
image: postgres:9.6
|
||||
container_name: kong-database
|
||||
restart: always
|
||||
networks:
|
||||
- kong-net
|
||||
environment:
|
||||
POSTGRES_USER: kong
|
||||
POSTGRES_DB: kong
|
||||
POSTGRES_PASSWORD: kong
|
||||
ports:
|
||||
- "5432:5432"
|
||||
#kong数据库的初始化
|
||||
kong-migration:
|
||||
container_name: kong-migration
|
||||
image: kong:latest
|
||||
command: "kong migrations bootstrap"
|
||||
networks:
|
||||
- kong-net
|
||||
restart: on-failure
|
||||
environment:
|
||||
KONG_PG_HOST: kong-database
|
||||
KONG_DATABASE: postgres
|
||||
KONG_PG_USER: kong
|
||||
KONG_PG_PASSWORD: kong
|
||||
KONG_CASSANDRA_CONTACT_POINTS: kong-database
|
||||
links:
|
||||
- kong-database
|
||||
depends_on:
|
||||
- kong-database
|
||||
|
||||
# 启动kong
|
||||
kong:
|
||||
container_name: kong
|
||||
image: kong:latest
|
||||
restart: always
|
||||
networks:
|
||||
- kong-net
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
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
|
||||
depends_on:
|
||||
- kong-migration
|
||||
- kong-database
|
||||
ports:
|
||||
- "8001:8001"
|
||||
- "8000:8000"
|
||||
- "8443:8443"
|
||||
- "8444:8444"
|
||||
#konga数据库的初始化
|
||||
konga-prepare:
|
||||
container_name: konga-prepare
|
||||
image: pantsel/konga:latest
|
||||
command: "-c prepare -a postgres -u postgresql://kong:kong@kong-database:5432/konga"
|
||||
networks:
|
||||
- kong-net
|
||||
restart: on-failure
|
||||
links:
|
||||
- kong-database
|
||||
depends_on:
|
||||
- kong
|
||||
- kong-database
|
||||
#postgres数据库存储数据
|
||||
konga:
|
||||
container_name: konga
|
||||
image: pantsel/konga:latest
|
||||
restart: always
|
||||
networks:
|
||||
- kong-net
|
||||
environment:
|
||||
DB_ADAPTER: postgres
|
||||
DB_HOST: kong-database
|
||||
DB_USER: kong
|
||||
DB_DATABASE: konga
|
||||
DB_PASSWORD: kong
|
||||
depends_on:
|
||||
- kong
|
||||
- kong-database
|
||||
ports:
|
||||
- "1337:1337"
|
Reference in New Issue
Block a user