Skip to content

Commit

Permalink
add experimental support for traefik2.1
Browse files Browse the repository at this point in the history
related PR in doodba-scaffolding: Tecnativa/doodba-scaffolding#67

closes Tecnativa#271
  • Loading branch information
Ivan Yelizariev committed Jan 29, 2020
1 parent 5a5d94d commit 6c453d2
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,8 @@ working [Traefik][] inverse proxy in each node.

To have it, use this `inverseproxy.yaml` file:

<details><summary>inverseproxy.yaml (traefik 1.6)</summary>

```yaml
version: "2.1"
Expand Down Expand Up @@ -823,6 +825,8 @@ networks:
volumes:
acme:
```
</details>


Then boot it up with:

Expand All @@ -843,6 +847,73 @@ This allows you to:
- Have multiple Odoo instances in each node.
- Add an SSL layer automatically and for free.

Also, there is experimental support for traefik 2, which has more [options](https://docs.traefik.io/middlewares/overview/#available-middlewares) to congifure.

<details><summary>inverseproxy.yaml (traefik 2.1)</summary>
```yaml
version: "2.1"
services:
proxy:
image: traefik:2.1
networks:
shared:
private:
public:
volumes:
- acme:/etc/traefik/acme:rw,Z
ports:
- "80:80"
- "443:443"
depends_on:
- dockersocket
restart: unless-stopped
privileged: true
tty: true
command:
- --entryPoints.web.address=:80
- --entryPoints.web-secured.address=:443
- --certificatesResolvers.main-acme.acme.email=your-email@your-domain.org
- --certificatesResolvers.main-acme.acme.storage=/etc/traefik/acme/acme.json
- --certificatesResolvers.main-acme.acme.httpChallenge.entryPoint=web
- --log.level=INFO
- --providers.docker
- --providers.docker.endpoint=http://dockersocket:2375
- --providers.docker.exposedByDefault=false
dockersocket:
image: tecnativa/docker-socket-proxy
privileged: true
networks:
private:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
CONTAINERS: 1
NETWORKS: 1
SERVICES: 1
SWARM: 1
TASKS: 1
restart: unless-stopped
networks:
shared:
internal: true
driver_opts:
encrypted: 1
private:
internal: true
driver_opts:
encrypted: 1
public:
volumes:
acme:
```
</details>

##### Testing

A good rule of thumb is test in testing before uploading to production, so this
Expand Down

0 comments on commit 6c453d2

Please sign in to comment.