Posts

Showing posts from March 18, 2019

Docker mis-forwarding ports

Image
0 I have several domains sharing one public IP (EC2 instance). My setup is like this: /home/ubuntu contains docker-compose.yml : version: '3' services: nginx-proxy: image: "jwilder/nginx-proxy" container_name: nginx-proxy volumes: - /var/run/docker.sock:/tmp/docker.sock:ro ports: - "80:80" restart: "always" This creates a network named ubuntu_default which will allow other compose instances to join. The nginx-proxy image creates reverse proxies for these other compose instances so that you can visit example.com and be routed to the appropriate UI within the appropriate compose instance. /home/ubuntu/example.com/project-1 contains a docker-compose.yml like: version: '3' services: db: build: "./db"