Skip to content

Commit

Permalink
Use real domains for digitalocean deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarnutsch committed Dec 3, 2024
1 parent 5bf5820 commit d375d76
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .digitalocean/comet-starter-cms.tpl.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions .digitalocean/comet-starter-site-main.tpl.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .digitalocean/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

doctl apps update <imgproxy-app-id> --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 <cms-app-id> --spec .digitalocean/comet-starter-cms.yaml # configuration changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-digital-ocean-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d375d76

Please sign in to comment.