added working deployment for bitweb's number-to-words API service

This commit is contained in:
Bryan Joshua Pedini 2021-08-13 15:23:48 +02:00
parent 87f1b0192d
commit 63d38c3f78
3 changed files with 30 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.env

27
docker-compose.yml Normal file
View File

@ -0,0 +1,27 @@
version: "3"
services:
web:
container_name: ${CONTAINER_NAME}
image: bitweb/number-to-words-api:${APP_VERSION}
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

2
env.example Normal file
View File

@ -0,0 +1,2 @@
APP_VERSION=latest
CONTAINER_NAME=number-to-words.api.bjphoster.com