Skip to content

Commit

Permalink
Update docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
massteff authored Jan 22, 2024
1 parent e9f7050 commit a6ed8cf
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.whoami-http.entrypoints=http
- traefik.http.routers.whoami-http.rule=Host(`${API_FQDN}`)
# We add a middleware to redirect HTTP to HTTPS
- traefik.http.routers.whoami-http.middlewares=redirect-to-https
## HTTPS
# We add the HTTPS configuration
- traefik.http.routers.whoami-https.entrypoints=https
- traefik.http.routers.whoami-https.rule=Host(`${API_FQDN}`)
- traefik.http.routers.whoami-https.tls=true
- traefik.http.routers.whoami-https.tls.certresolver=letsencrypt
networks:
- traefik

networks:
traefik:
external: true

0 comments on commit a6ed8cf

Please sign in to comment.