From b65b0519342accf9ee17780eb541ee0a0332710d Mon Sep 17 00:00:00 2001 From: Daniel Karnutsch Date: Mon, 9 Dec 2024 12:53:21 +0100 Subject: [PATCH] Use real domains for DigitalOcean deployment (#584) --- .digitalocean/comet-starter-cms.tpl.yaml | 13 ++++++++----- .digitalocean/comet-starter-site-main.tpl.yaml | 11 ++++++++--- .digitalocean/deploy.sh | 2 +- .../workflows/update-digital-ocean-deployment.yml | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.digitalocean/comet-starter-cms.tpl.yaml b/.digitalocean/comet-starter-cms.tpl.yaml index 52c989d6a..e92a73f50 100644 --- a/.digitalocean/comet-starter-cms.tpl.yaml +++ b/.digitalocean/comet-starter-cms.tpl.yaml @@ -1,6 +1,9 @@ alerts: - rule: DEPLOYMENT_FAILED - rule: DOMAIN_FAILED +domains: + - domain: admin.digitalocean.comet-dxp.com + type: PRIMARY features: - buildpack-stack=ubuntu-22 ingress: @@ -50,7 +53,7 @@ services: value: starter - key: API_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/public-api/api + value: https://admin.digitalocean.comet-dxp.com/public-api/api - key: API_PORT scope: RUN_AND_BUILD_TIME value: "4000" @@ -147,7 +150,7 @@ services: value: https://auth-sso.vivid-planet.cloud/oauth2/sessions/logout - key: POST_LOGOUT_REDIRECT_URI scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/oauth2/sign_out?rd=%2F + value: https://admin.digitalocean.comet-dxp.com/oauth2/sign_out?rd=%2F - key: ACL_ALL_PERMISSIONS_DOMAINS scope: RUN_AND_BUILD_TIME value: "vivid-planet.com" @@ -261,16 +264,16 @@ services: value: production - key: API_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/api + value: https://admin.digitalocean.comet-dxp.com/api - key: ADMIN_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/ + value: https://admin.digitalocean.comet-dxp.com/ - key: PUBLIC_SITE_CONFIGS scope: RUN_AND_BUILD_TIME value: "{{ site://configs/public/dev }}" - key: PREVIEW_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-site-preview-jespg.ondigitalocean.app + value: https://preview.digitalocean.comet-dxp.com github: branch: main deploy_on_push: false diff --git a/.digitalocean/comet-starter-site-main.tpl.yaml b/.digitalocean/comet-starter-site-main.tpl.yaml index ac2baed75..9b633d2df 100644 --- a/.digitalocean/comet-starter-site-main.tpl.yaml +++ b/.digitalocean/comet-starter-site-main.tpl.yaml @@ -1,6 +1,11 @@ alerts: - rule: DEPLOYMENT_FAILED - rule: DOMAIN_FAILED +domains: + - domain: digitalocean.comet-dxp.com + type: PRIMARY + - domain: preview.digitalocean.comet-dxp.com + type: ALIAS features: - buildpack-stack=ubuntu-22 ingress: @@ -28,13 +33,13 @@ services: value: production - key: ADMIN_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/ + value: https://admin.digitalocean.comet-dxp.com/ - key: NEXT_PUBLIC_API_URL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/public-api/api + value: https://admin.digitalocean.comet-dxp.com/public-api/api - key: API_URL_INTERNAL scope: RUN_AND_BUILD_TIME - value: https://comet-starter-cms-64wfr.ondigitalocean.app/public-api/api + value: https://admin.digitalocean.comet-dxp.com/public-api/api - key: SITE_PREVIEW_SECRET scope: RUN_AND_BUILD_TIME type: SECRET diff --git a/.digitalocean/deploy.sh b/.digitalocean/deploy.sh index 774ee7ad0..27e87326a 100644 --- a/.digitalocean/deploy.sh +++ b/.digitalocean/deploy.sh @@ -4,7 +4,7 @@ doctl apps update --spec .digitalocean/comet-starter-imgproxy.yaml -sed -i '' 's/dev\.comet\-dxp\.com/comet-starter-site-tyqqf.ondigitalocean.app/g' site-configs/main.ts +sed -i '' 's/dev\.comet\-dxp\.com/digitalocean.comet-dxp.com/g' site-configs/main.ts APP_ENV=dev npx -y @comet/cli inject-site-configs -f site-configs/site-configs.ts -i .digitalocean/comet-starter-cms.tpl.yaml -o .digitalocean/comet-starter-cms.yaml doctl apps update --spec .digitalocean/comet-starter-cms.yaml # configuration changes diff --git a/.github/workflows/update-digital-ocean-deployment.yml b/.github/workflows/update-digital-ocean-deployment.yml index f2eacd7a5..f13f172a3 100644 --- a/.github/workflows/update-digital-ocean-deployment.yml +++ b/.github/workflows/update-digital-ocean-deployment.yml @@ -21,7 +21,7 @@ jobs: - name: Inject Site Configurations run: | - sed -i 's/dev\.comet\-dxp\.com/comet-starter-site-tyqqf.ondigitalocean.app/g' site-configs/main.ts + sed -i 's/dev\.comet\-dxp\.com/digitalocean.comet-dxp.com/g' site-configs/main.ts APP_ENV=dev npx -y @comet/cli inject-site-configs -f site-configs/site-configs.ts -i .digitalocean/comet-starter-cms.tpl.yaml -o .digitalocean/comet-starter-cms.yaml APP_ENV=dev npx -y @comet/cli inject-site-configs -f site-configs/site-configs.ts -i .digitalocean/comet-starter-site-main.tpl.yaml -o .digitalocean/comet-starter-site-main.yaml