Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx service waiting for web:8000 at startup #3666

Open
wants to merge 1 commit into
base: ng
Choose a base branch
from

Conversation

pinoatrome
Copy link

@pinoatrome pinoatrome commented Oct 15, 2021

the docker compose command docker-compose up -d can result in a nginx container exited after error connecting to web:8000 (proxy_pass http://web:8000; in nginx conf file) when web container is still not available.
using ralf.entrypoint.nginx script as entrypoint.sh for the nginx image will start nginx process only after service web is active and responding on port 8000

@pinoatrome
Copy link
Author

the error is
nginx: [emerg] host not found in upstream "web" in /etc/nginx/conf.d/default.conf:22

and this is the output of "docker-compose ps" command (note nginx service down) after "docker-compose up -d" command to start ralph.

$:~/projects/ralph$ docker-compose ps
      Name                    Command               State            Ports
---------------------------------------------------------------------------------------------
ralph_db_1      docker-entrypoint.sh mysql ...   Up      0.0.0.0:3306->3306/tcp, 33060/tcp
ralph_inkpy_1   /bin/sh -c supervisord -n        Up
ralph_nginx_1   /docker-entrypoint.sh ngin ...   Exit 1
ralph_redis_1   docker-entrypoint.sh redis ...   Up       0.0.0.0:9079->6379/tcp
ralph_web_1     /var/local/ralph/docker-en ...   Up       0.0.0.0:9000->8000/tcp

@pinoatrome pinoatrome changed the title nginx service waiting for web:9000 at startup nginx service waiting for web:8000 at startup Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants