im trying to set up Kong for my company, i followed the instruction from Kong documentation.
first i run this command:
docker network create kong-net
and then this command:
docker run -d --name kong-database \
--network=kong-net \
-p 5432:5432 \
-e "POSTGRES_USER=kong" \
-e "POSTGRES_DB=kong" \
-e "POSTGRES_PASSWORD=kong" \
postgres:9.6
according to documentation, next step is run the migration with this command
docker run --rm --network=kong-net -e "KONG_DATABASE=postgres" -e "KONG_PG_HOST=kong-database" -e "KONG_PG_USER=kong" -e "KONG_PG_PASSWORD=kong" kong:latest kong migrations up
but it keeps giving me this error
Error: missing database for connect
full log
Error:
/usr/local/share/lua/5.1/pgmoon/init.lua:547: missing database for connect
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/pgmoon/init.lua:547: in function 'send_startup_message'
/usr/local/share/lua/5.1/pgmoon/init.lua:207: in function 'connect'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:202: in function 'connect'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:489: in function 'query'
.../share/lua/5.1/kong/db/strategies/postgres/connector.lua:270: in function 'init'
/usr/local/share/lua/5.1/kong/db/init.lua:138: in function 'init_connector'
/usr/local/share/lua/5.1/kong/cmd/migrations.lua:95: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:48: in function <init_worker_by_lua:46>
[C]: in function 'xpcall'
init_worker_by_lua:55: in function <init_worker_by_lua:53>
2020/07/23 03:38:40 [verbose] no config file found at /etc/kong/kong.conf
2020/07/23 03:38:40 [verbose] no config file found at /etc/kong.conf
2020/07/23 03:38:40 [verbose] no config file, skip loading
2020/07/23 03:38:40 [verbose] prefix in use: /usr/local/kong
where did i go wrong ?