Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
leej3 committed Aug 6, 2024
1 parent f4482d0 commit ba14601
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions web_api/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ services:
- "--entrypoints.http.address=:80"
- "--entrypoints.https.address=:443"
- "--certificatesresolvers.le.acme.email=${CERT_EMAIL}"
- "--certificatesresolvers.le.acme.storage=/certificates/acme.json"
- "--certificatesresolvers.le.acme.tlschallenge=true"
- --log
- --accesslog
ports:
Expand All @@ -115,7 +117,8 @@ networks:
external: true
volumes:
traefik-public-certificates:
EOF
EOF)
COMPOSE_FILE=$(cat <<EOF
version: '3'
services:
Expand All @@ -134,12 +137,23 @@ services:
- traefik.http.routers.osm_web_api-http.entrypoints=http
- traefik.http.routers.osm_web_api-http.rule=Host(`osm.pythonaisolutions.com`)
- traefik.docker.network=traefik-default
# https
- traefik.http.routers.osm_web_api-https.entrypoints=https
- traefik.http.routers.osm_web_api-https.rule=Host(`osm.pythonaisolutions.com`)
- traefik.http.routers.osm_web_api-https.tls=true
# use the "le" (Let's Encrypt) resolver to get Let's Encrypt certificates
- traefik.http.routers.osm_web_api-https.tls.certresolver=le
# https-redirect middleware
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
# apply the redirect middleware to the http router
- traefik.http.routers.osm_web_api-http.middlewares=https-redirect
networks:
traefik-public:
external: true
EOF
)
EOF)
# Create a temporary docker-compose.yaml file locally
echo "${COMPOSE_FILE}" > temp.yaml
Expand Down

0 comments on commit ba14601

Please sign in to comment.