Trying to run our web app with Good Data embedded within a docker container. They IP that is making the request is internal, http://172.19.0.4, I believe this is why we are getting the 401 unauthorized access when we try to access the app. The app works fine from outside the docker container.
Looking for suggestions on how to get around this problem or if anyone has encountered it
This is a snipit of our docker-compose file
version: '3'
services:
server:
build:
context: .
dockerfile: ./docker/server/Dockerfile
container_name: server
hostname: ${HOSTNAME}
restart: unless-stopped
ports:
- "8000:8000"
- "8080:8080"
nginx:
image: nginx:stable-alpine
container_name: nginx
hostname: nginx
restart: unless-stopped
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
ports:
- "80:80"
- "443:443"
volumes:
- /data/var/docker/volumes/nginx_web/etc/nginx/conf.d:/etc/nginx/conf.d
- /data/var/docker/volumes/certbot/etc/letsencrypt:/etc/letsencrypt
- /data/var/docker/volumes/certbot/var/www/certbot:/var/www/certbot
certbot:
image: certbot/certbot
container_name: certbot
hostname: certbot
restart: unless-stopped
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- /data/var/docker/volumes/certbot/etc/letsencrypt:/etc/letsencrypt
- /data/var/docker/volumes/certbot/var/www/certbot:/var/www/certbot
watchtower:
image: containrrr/watchtower
restart: always
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
default:
external:
name: holnet
Best answer by Martin Burian
View original