chore(deploy): provision D1 targets config [D1]#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87bd323540
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| DATABASE_URL= | ||
| DATABASE_URL_DIRECT= |
There was a problem hiding this comment.
Set Fly secrets with Spring datasource variable names
The deployment template uses DATABASE_URL/DATABASE_URL_DIRECT, but this backend reads datasource settings from spring.datasource.* (backend/src/main/resources/application.yml), and there is no mapping from DATABASE_URL to those properties. In a Fly deploy that follows this config, the app will keep the default jdbc:postgresql://localhost:5432/workwell and fail to connect to Neon in production. Use SPRING_DATASOURCE_URL/SPRING_DATASOURCE_USERNAME/SPRING_DATASOURCE_PASSWORD (and Flyway-specific keys if needed) or explicitly bind DATABASE_URL in Spring config.
Useful? React with 👍 / 👎.
| primary_region = 'ord' | ||
|
|
||
| [build] | ||
| dockerfile = '../infra/backend.Dockerfile' |
There was a problem hiding this comment.
Align Fly build context with backend Dockerfile assumptions
This dockerfile path points to ../infra/backend.Dockerfile, but that Dockerfile expects repo-root context (COPY backend/ ./ in infra/backend.Dockerfile). Fly's own config docs state that setting build.dockerfile does not change build context; with the documented cd backend workflow, deploy builds from backend/ and COPY backend/ will fail because that path is outside the context. Configure deploy from repo root (or set an explicit working directory) or rewrite the Dockerfile to copy from the backend context.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Adds initial deployment/provisioning scaffolding and documentation for the Vercel + Fly.io + Neon + Anthropic stack, including environment variable templates and Fly app configuration for the backend.
Changes:
- Added
docs/DEPLOY.mdwith D1 provisioning steps and deployment notes for Neon/Fly/Vercel/Anthropic. - Added
backend/fly.tomlfor a new Fly app (workwell-measure-studio-api) with health checks and 512MB sizing. - Added root
.env.exampleand updated.gitignoreto commit the template while keeping real env files ignored.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| docs/DEPLOY.md | New deployment guide covering provisioning, env vars, CI/CD notes, and troubleshooting. |
| backend/fly.toml | Fly.io app config (build, env, HTTP service, health check, VM sizing). |
| .gitignore | Ensures .env.example is not ignored while .env* remains ignored. |
| .env.example | Adds a committed template for required Fly/Vercel environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Dashboard → Deployments → previous → Promote to Production. | ||
|
|
||
| ### Neon | ||
| Each schema migration creates a branch. Promote previous branch to main from Neon dashboard. |
| **MCP server can't be reached** | ||
| - MCP runs as separate process or endpoint (`/mcp`) | ||
| - Check Fly machine has port exposed if using stdio over HTTP | ||
| - Verify Claude Desktop config points to deployed URL |
|
|
||
| - Backend: `GET /actuator/health` → `{"status":"UP"}` | ||
| - Frontend: `GET /` → 200 OK | ||
| - DB: from Fly machine, `fly ssh console` → `psql $DATABASE_URL_DIRECT -c "SELECT 1"` |
| fly secrets set DATABASE_URL=<neon-pooled> | ||
| fly secrets set DATABASE_URL_DIRECT=<neon-direct> | ||
| fly secrets set ANTHROPIC_API_KEY=<key> | ||
| fly secrets set SPRING_PROFILES_ACTIVE=prod |
| ```bash | ||
| cd backend | ||
| fly launch --no-deploy | ||
| fly secrets set DATABASE_URL=<neon-pooled> | ||
| fly secrets set DATABASE_URL_DIRECT=<neon-direct> |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
Provisioning evidence
Blockers
Verification