2021-08-13 13:23:48 +00:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
container_name: ${CONTAINER_NAME}
|
|
|
|
image: bitweb/number-to-words-api:${APP_VERSION}
|
2021-08-13 13:29:46 +00:00
|
|
|
expose:
|
|
|
|
- 80
|
2021-08-13 13:23:48 +00:00
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
|
|
|
### Section HTTP
|
|
|
|
- traefik.http.routers.http-number-to-words_api_bjphoster_com.entrypoints=http
|
|
|
|
# redirect to HTTPS only
|
|
|
|
- traefik.http.routers.http-number-to-words_api_bjphoster_com.middlewares=http-to-https
|
|
|
|
- traefik.http.routers.http-number-to-words_api_bjphoster_com.rule=Host(`number-to-words.api.bjphoster.com`)
|
|
|
|
### Section HTTPS
|
|
|
|
- traefik.http.routers.https-number-to-words_api_bjphoster_com.entrypoints=https
|
|
|
|
# configure the exposed service
|
|
|
|
- traefik.http.routers.https-number-to-words_api_bjphoster_com.rule=Host(`number-to-words.api.bjphoster.com`)
|
|
|
|
# of course, enable TLS and it's certificate provider
|
|
|
|
- traefik.http.routers.https-number-to-words_api_bjphoster_com.tls=true
|
|
|
|
- traefik.http.routers.https-number-to-words_api_bjphoster_com.tls.certresolver=letsencrypt
|
|
|
|
networks:
|
|
|
|
- traefik-proxy
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik-proxy:
|
|
|
|
external: true
|