Step by step manual:
-
create network traefik (external: true, network name: web)
$ docker network create web
-
Run traefik 2.0
$ pwd; /home/project/traefik.docker $ docker-compose up -d
-
Copy docker-compose.example.yml to new project rename it to docker-compose.yml (or merge if it already exist) and custom it for your project
-
Include every services which you want to host into web network:
services: service-name: networks: - web
-
Run docker into your project:
$ pwd; /home/project/example.com $ docker-compose up -d
-
Check into project docker-compose.yml no external:true network are declared, except web
For example you can:
api_net: external: false
* api_net - some existed network into project (before treafik was added)