-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
28 lines (25 loc) · 1004 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: "3.9"
services:
example:
image: nginx
labels:
- traefik.http.routers.api.rule=Host(`example.com`)
- traefik.http.routers.api.tls=true
- traefik.http.routers.api.tls.certresolver=letsencrypt
- traefik.http.services.api.loadbalancer.server.port=80
- traefik.http.routers.myrouter.entrypoints=web,websecure
traefik:
image: traefik:v2.6.1
command:
- --api.insecure=true
- --providers.docker
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entryPoint.to=websecure
- --entrypoints.websecure.address=:443
- --certificatesresolvers.letsencrypt.acme.email=denys.podlesnyi@djangostars.com
- --certificatesresolvers.letsencrypt.acme.storage=acme.json
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.letsencrypt.acme.tlschallenge=true
network_mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock