Skip to content

Commit

Permalink
Merge pull request #72 from smokestacklightnin/infra/gha/fix-letsencr…
Browse files Browse the repository at this point in the history
…ypt-urls

Add `DEPLOYMENT_URI` to Let's Encrypt configuration
  • Loading branch information
leej3 authored Nov 1, 2024
2 parents 6aaace1 + 508e70f commit b89e408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
run: |
if [[ ${{ inputs.development-environment }} == 'production' ]]; then
echo "HOST_URI=${SSH_PROD_HOST}" >> $GITHUB_ENV
echo "DEPLOYMENT_URI=${{ vars.PRODUCTION_DEPLOYMENT_URI }}" >> $GITHUB_ENV
else
echo "HOST_URI=${SSH_STAGE_HOST}" >> $GITHUB_ENV
fi
echo "DEPLOYMENT_URI=${{ vars.STAGING_DEPLOYMENT_URI }}" >> $GITHUB_ENV
fi
- name: Configure SSH
env:
Expand Down Expand Up @@ -70,6 +72,7 @@ jobs:
AWS_ACCOUNT_ID="${AWS_ACCOUNT_ID}" \
AWS_REGION="${AWS_REGION}" \
LETSENCRYPT_ADMIN_EMAIL=${LETSENCRYPT_ADMIN_EMAIL} \
DEPLOYMENT_URI=${DEPLOYMENT_URI} \
docker compose -f - up -d < ./web/deploy/docker-compose.yaml
- name: Prune Docker artifacts
Expand Down
4 changes: 2 additions & 2 deletions web/deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
labels:
- traefik.enable=true
- traefik.docker.network=osm_traefik-public
- traefik.http.routers.osm_web_api.rule=Host("`${HOST_URI}`") && PathPrefix(`/api`)
- traefik.http.routers.osm_web_api.rule=Host("`${DEPLOYMENT_URI}`") && PathPrefix(`/api`)
- "traefik.http.routers.osm_web_api.entrypoints=web,websecure"
- traefik.http.services.osm_web_api.loadbalancer.server.port=80
- traefik.http.routers.osm_web_api.tls=true
Expand All @@ -29,7 +29,7 @@ services:
labels:
- traefik.enable=true
- traefik.docker.network=osm_traefik-public
- traefik.http.routers.dashboard.rule=Host("`${HOST_URI}`")
- traefik.http.routers.dashboard.rule=Host("`${DEPLOYMENT_URI}`")
- traefik.http.routers.dashboard.entrypoints=web,websecure
- traefik.http.services.dashboard.loadbalancer.server.port=8501
- traefik.http.routers.dashboard.tls=true
Expand Down

0 comments on commit b89e408

Please sign in to comment.