I've tried to get it working on windows host with linux container but i cant seem to get it done. I can't reach http://nginx.test. I've tried setting my DNS to my ethernet adapter to 127.0.0.1 but it doesn't work either.
This my docker-compose.yml:
services:
mongo:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=$DB_USER
- MONGO_INITDB_ROOT_PASSWORD=$DB_PASSWORD
- MONGO_INITDB_DATABASE=$DB_NAME
volumes:
- ./docker_init_db.js:/docker-entrypoint-initdb.d/mongo_init_db.js
ports:
- $DOCKER_EXTERNAL_DB_PORT:$DB_PORT
container_name: mongo
node:
image: my-nest-1
build:
context: .
dockerfile: Dockerfile
environment:
- DB_HOST=$DB_HOST
- DB_PORT=$DB_PORT
- DB_USER=$DB_USER
- DB_PASSWORD=$DB_PASSWORD
- DB_NAME=$DB_NAME
depends_on:
- mongo
ports:
- $DOCKER_EXTERNAL_PORT:$PORT
restart: on-failure
nginx:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
hostname: nginx.test
ports:
- 80:80
hoster:
image: dvdarias/docker-hoster
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- /etc/hosts:/tmp/hosts
This is the log that i'm getting:
ads-manager-backend-hoster-1 | Updating hosts file with:
ads-manager-backend-hoster-1 | ip: 172.18.0.2 domains: {'hoster', 'ads-manager-backend-hoster-1', '055fc411813a'}
ads-manager-backend-hoster-1 | ip: 172.18.0.3 domains: {'nginx.test', 'nginx', 'f10692a9d664', 'ads-manager-backend-nginx-1'}
ads-manager-backend-hoster-1 | ip: 172.18.0.4 domains: {'9ef74e44b616', 'mongo'}
ads-manager-backend-hoster-1 | ip: 172.18.0.5 domains: {'node', 'ads-manager-backend-node-1', '2f4499114ad9'}
I've tried to get it working on windows host with linux container but i cant seem to get it done. I can't reach http://nginx.test. I've tried setting my DNS to my ethernet adapter to 127.0.0.1 but it doesn't work either.
This my docker-compose.yml:
This is the log that i'm getting: