number-to-words-api/docker-compose.yml

30 lines
1.1 KiB
YAML

version: "3"
services:
web:
container_name: ${CONTAINER_NAME}
image: bitweb/number-to-words-api:${APP_VERSION}
expose:
- 80
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