单机运行postgresql&& 安装kong-gateway
单机运行postgresql
version: '3'
services:
kong-postgres:
image: harbor.iovhm.com/hub/postgres:9.6.24
restart: always
container_name: kong-postgres
privileged: true
ports:
- 5432:5432
volumes:
- ./postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=<kong user>
- POSTGRES_DB=k<kong db>
- POSTGRES_PASSWORD=<kong password>
初始化数据库
docker run --rm \
-e "KONG_DATABASE=postgres" \
-e "KONG_PG_HOST=<PG HOST>" \
-e "KONG_PG_PORT=<PG PORT>" \
-e "KONG_PG_PASSWORD=<kong pass>" \
harbor.iovhm.com/hub/kong:3.0 kong migrations bootstrap