Skip to content

Commit

Permalink
Merge pull request #15 from heig-lherman/massteff-patch-3
Browse files Browse the repository at this point in the history
Update docker-compose.yaml
  • Loading branch information
massteff authored Jan 22, 2024
2 parents e9f7050 + fde406b commit 138a97c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
version: '3.8'

services:

dai-pw04:
image: ghcr.io/heig-lherman/dai-pw04:latest
ports:
- "8080:8080"
command: "server"
labels:
## Traefik
- traefik.enable=true
- traefik.docker.network=traefik
## HTTP
- traefik.http.routers.api-http.entrypoints=http
- traefik.http.routers.api-http.rule=Host(`${API_FQDN}`)
# We add a middleware to redirect HTTP to HTTPS
- traefik.http.routers.api-http.middlewares=redirect-to-https
## HTTPS
# We add the HTTPS configuration
- traefik.http.routers.api-https.entrypoints=https
- traefik.http.routers.api-https.rule=Host(`${API_FQDN}`)
- traefik.http.routers.api-https.tls=true
- traefik.http.routers.api-https.tls.certresolver=letsencrypt
networks:
- traefik

networks:
traefik:
external: true

0 comments on commit 138a97c

Please sign in to comment.