Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. Create network
- docker network create kong-net
- 2. Create cassandra container
- docker run -d --name kong-database \
- --network=kong-net \
- -p 9042:9042 \
- cassandra:3
- 3. Generate database schema
- docker run --rm \
- --network=kong-net \
- -e "KONG_DATABASE=cassandra" \
- -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
- kong:latest kong migrations bootstrap
- **** Use docker start kong-database for next time ****
- 4. docker run -d --name kong \
- --network=kong-net \
- -e "KONG_DATABASE=cassandra" \
- -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
- -e "KONG_ADMIN_LISTEN=0.0.0.0:8001" \
- -p 8000:8000 \
- -p 8001:8001 \
- kong:latest
- **** Use docker start kong for next time ****
- **** docker exec -it kong kong start *****
- 5 Test Kong status
- 5.1 curl http://localhost:8001
- 5.2 curl http://localhost:8081/status
- 6. Create Fake Service
- 6.1 Share drive api.js to container
- 6.2 npm install faker
- 6.3 docker run --name product-service --network kong-net -p 3000:3000 -v /NodeServers/FakeAPI:/data
- williamyeh/json-server api.js
- 6.4 http://localhost:3000/products
Add Comment
Please, Sign In to add comment