Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
oscartbeaumont committed Oct 24, 2024
1 parent 9d2d0ea commit 7160f49
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
working-directory: apps/web
run: |
set -o pipefail
pnpm dlx wrangler pages deploy 2>&1 | tee -a BUILD_OUTPUT
pnpm dlx wrangler pages deploy dist/ --project-name web 2>&1 | tee -a BUILD_OUTPUT
- name: Export `DEPLOYMENT_URL`
id: result
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
working-directory: apps/api
run: |
set -o pipefail
pnpm dlx wrangler deploy 2>&1 | tee -a BUILD_OUTPUT
pnpm dlx wrangler deploy src/index.ts --define "import.meta.env.GIT_SHA:$(git rev-parse HEAD)" 2>&1 | tee -a BUILD_OUTPUT
- name: Export `DEPLOYMENT_URL`
id: result
Expand Down
36 changes: 36 additions & 0 deletions apps/api/wrangler.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#:schema node_modules/wrangler/config-schema.json
name = "api"
main = "src/index.ts"
compatibility_date = "2024-10-01"
compatibility_flags = ["nodejs_compat_v2"]

# TODO: Require auth on preview deployments
workers_dev = true

# Basically we take over /api/* from the Cloudflare Pages project.
# We can't serve assets through this deployment without loosing smart placement on the API code due to the lack of `_headers` and `_redirects` support.
route = { pattern = "cloud.mattrax.app/api/*", zone_name = "mattrax.app" }

[observability]
enabled = true

[placement]
mode = "smart"

[define]
"import.meta.env.DEV" = "true"
"import.meta.env.MODE" = "production"
"import.meta.env.NODE_ENV" = "production"

[vars]
NODE_ENV = "production"
VITE_PROD_ORIGIN = "https://cloud.mattrax.app"
MANAGE_URL = "https://manage.mattrax.app"
FROM_ADDRESS = "Mattrax <[email protected]>"
INTERNAL_SECRET = ""
DATABASE_URL = ""
AWS_ACCESS_KEY_ID = ""
AWS_SECRET_ACCESS_KEY = ""
WAITLIST_DISCORD_WEBHOOK_URL = ""
FEEDBACK_DISCORD_WEBHOOK_URL = ""
DO_THE_THING_WEBHOOK_URL = ""

0 comments on commit 7160f49

Please sign in to comment.