Comments (6)
Hi @dirkmoors - sorry for the super late update. Docker compose is a nice addition. Do you think you can update your example with the latest 0.6.1 release?
Happy to merge this into our repo.
from docker-kong.
@thefosk if @dirkmoors doesn't I don't mind picking up the torch there. I'm half way through as it is of doing almost the same thing.
from docker-kong.
This will not work with a cold cassandra container, since cassandra is still bootstrapping whilst it is linked into the kong container. With docker-compose stop && docker-compose rm -f && docker-compose up
I get:
kong_1 | [ERR] Cassandra error: All hosts tried for query failed. cassandra:9042: connection refused for socket with peer cassandra:9042.
kong_1 | [ERR] Could not start Kong
This is due to a lack in feature of docker really, it should allow you to listen for exposed ports to be opened. So for the moment being I would suggest a small bootstrap wrapper on the kong container. The following works for me, but you might want to add some timeout on that loop to catch missconfiguration (e.g. wrong alias/missing cassandra):
kong-cassandra:
image: cassandra:2.2.4
kong:
image: mashape/kong
links:
- kong-cassandra:cassandra
ports:
- 8000:8000
- 8001:8001
command: sh -c 'until nc --recv-only -i 0.1 cassandra 9042 2>&1 >/dev/null|grep timeout >/dev/null; do :; done; kong start && tail -f /usr/local/kong/logs/error.log'
At this point, it would probably be best to use entrypoint instead of command on the kong image in order to avoid the extra shell.
from docker-kong.
since cassandra is still bootstrapping whilst it is linked into the kong container
Somebody suggested using restart: always
to make this work.
from docker-kong.
Or use dockerize
to make the container wait for Cassandra before kong start
is issued.
from docker-kong.
Available now for 0.9 in the compose
folder :)
from docker-kong.
Related Issues (20)
- kong_1 | standard_init_linux.go:228: exec user process caused: operation not permitted HOT 1
- plugin is enabled but not installed HOT 2
- Image missing for arm64 HOT 3
- kong migrations bootstrap Error HOT 4
- Running kong/kong-gateway:3.2-alpine failing with kong/model/analytics/payload.proto: No such file or directory HOT 3
- Is Kong is Supported on RISV machine HOT 1
- Docker Install link is wrong HOT 1
- 3.3.0 alpine image missing arm architecture HOT 1
- Kong Go-plugins dir is not created and users of the image must create it before running this image HOT 1
- kong 3.4.0 missing architecture arm64 for debian bullseye HOT 1
- Ubuntu image is missing useradd HOT 1
- [Http2]: docker compose can not enable http2 HOT 2
- Customize broken since luarocks-admin not on path
- Error when run Kong database with docker container
- Problem with custom plugins
- Permission error in portainer logs after starting HOT 3
- How to configure SSL to https to access 8443 HOT 1
- Add Headers in Docker Kong
- Image kong/kong-gateway:3.5.0.3-amazonlinux-2023 does not allow write permissions for kong user HOT 6
- kong initialize postgres error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-kong.