Open ChRocheFR opened 5 years ago
Try changing the port in docker-compose.yaml from 8080 to 80 and point your browser to: http://127.0.0.1
version: '3'
services:
azure-vote-back:
image: redis
container_name: azure-vote-back
ports:
- "6379:6379"
azure-vote-front:
build: ./azure-vote
image: azure-vote-front
container_name: azure-vote-front
environment:
REDIS: azure-vote-back
ports:
- "80:80"
I got 502 bad gateway error as well.
the related error logs for reference:
alembic upgrade head[error] 12#12: *91 connect() to unix:///tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: 10.240.255.55, server: , request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "20.193.9.120" /usr/lib/python2.7/dist-packages/supervisor/options.py:461: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. to unix:///tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, clien 'Supervisord is running as root and it is searching 'HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "20.193.9.120", referrer: 2021-03-08 08:48:26,315 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.//20.193.9.120/" "Mozilla/5.0 (Macintosh; Intel Mac OS2021-03-08 08:48:26,315 INFO Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing 2021-03-08 08:48:26,323 INFO RPC interface 'supervisor' initializedgi.sock failed (111: Connection refused) while connecting to upstream, clien2021-03-08 08:48:26,323 CRIT Server 'unix_http_server' running without any HTTP authentication checkingt: "20.193.9.120" 2021-03-08 08:48:26,323 INFO supervisord started with pid 11.1" 502 560 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.362021-03-08 08:48:27,326 INFO spawned: 'nginx' with pid 10"-"
Try changing the port in docker-compose.yaml from 8080 to 80 and point your browser to: http://127.0.0.1
version: '3' services: azure-vote-back: image: redis container_name: azure-vote-back ports: - "6379:6379" azure-vote-front: build: ./azure-vote image: azure-vote-front container_name: azure-vote-front environment: REDIS: azure-vote-back ports: - "80:80"
Yeah accessing http://127.0.0.1 instead of http://localhost works.
I followed the tutorial for deploying this app in Azure Container Registry but tried to launch the app with Azure Container Instance (with a Linux machine). The deployment went well but when reaching the site, I got a 502 error.
Do not really know if I made a mistake or if this is due to the code itself.