-
Notifications
You must be signed in to change notification settings - Fork 33
/
docker-compose.yml
29 lines (26 loc) · 990 Bytes
/
docker-compose.yml
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.8"
networks:
traefik-public:
external: true
services:
todo_app:
build:
context: .
dockerfile: Dockerfile
command: /start
image: renceinbox/fastapi-todo:main
networks:
- traefik-public
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.constraint-label=traefik-public
- traefik.http.routers.fastapi-todo-http.rule=Host(`todo-fastapi.renceinbox.com`)
- traefik.http.routers.fastapi-todo-http.entrypoints=http
- traefik.http.routers.fastapi-todo-http.middlewares=https-redirect
- traefik.http.routers.fastapi-todo-https.rule=Host(`todo-fastapi.renceinbox.com`)
- traefik.http.routers.fastapi-todo-https.entrypoints=https
- traefik.http.routers.fastapi-todo-https.tls=true
- traefik.http.routers.fastapi-todo-https.tls.certresolver=le
- traefik.http.services.fastapi-todo.loadbalancer.server.port=8001