Docker Community Forums

Share and learn in the Docker community.

Help with Docker-Compose


(Kevinsillo) #1

Hello my name is kevin. I’m learning about Docker-Compose. Can someone help me?

I have the name of the pages in the hosts file (pag1 and page2). Both of them Nginx server works but don’t show my webs in / home / kevin (web / html and web2 / html).

503 Service Temporarily Unavailable

nginx/1.14.0

Docker version 18.06.1-ce, build e68fc7a
docker-compose version 1.17.1, build unknown

It’s my docker-compose.yml:

version: “3.5”
services:
reverse_proxy:
container_name: servidorWeb
image: jwilder/nginx-proxy
network_mode: “bridge”
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- “80:80”
nginx:
container_name: pagina1
image: nginx
network_mode: “bridge”
depends_on:
- reverse_proxy
environment:
- NGINX_HOST=page1.com
- NGINX_PORT=80
volumes:
- /home/kevin/web/html/web/html:/usr/share/nginx/html
nginx2:
container_name: pagina2
image: nginx
network_mode: “bridge”
depends_on:
- reverse_proxy
environment:
- NGINX_HOST=page2.com
- NGINX_PORT=80
volumes:
- /home/kevin/web/html/web2/html:/usr/share/nginx/html