Closed cjacky475 closed 4 months ago
I suggest running a reverse proxy container that supports service discovery like nginx-proxy
or traefik
as described in readme (https://github.com/Wowu/docker-rollout#%EF%B8%8F-caveats). Your setup will not work as docker-rollout
does not have any hook or callback support yet for the reload command. You can try to modify the script to add the reload command, or use the recommended setup (see https://github.com/Wowu/docker-rollout/tree/main/examples)
Hi, @Wowu, thanks for the answer. Actually I have plain NGINX as reverse proxy, but not the nginx-proxy image itself with auto detection. As you mentioned to modify the script, would this still be fine for production system? I believe putting it below
# shellcheck disable=SC2086 # DOCKER_ARGS and OLD_CONTAINER_IDS must be unquoted to allow multiple arguments
docker $DOCKER_ARGS stop $OLD_CONTAINER_IDS
# shellcheck disable=SC2086 # DOCKER_ARGS and OLD_CONTAINER_IDS must be unquoted to allow multiple arguments
docker $DOCKER_ARGS rm $OLD_CONTAINER_IDS
is appropriate, right? Any consequences?
Thanks.
Yes, it should be alright. However, it will be more difficult to update docker rollout when a new version is available.
Thanks, I hope you guys add hook/callback support for reload command :) Cheers.
My
docker-compose.yml
is:docker rollout -f docker-compose.yml backend
results in it actually working every second time, not sure why. First time I call this the frontend cannot call the backend, it says 404, second time I usedocker rollout ...
then it starts working. And it only works every second time, not sure why. The time it's not working I have to calldocker compose exec frontend /usr/sbin/nginx -s reload
for it to work.Cheers for the help.