Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Fly.io deployment support for the combined web + cms Next.js apps by introducing a Docker-based runtime (nginx reverse proxy + two standalone Next servers) and GitHub Actions workflows for deploy + PR notifications.
Changes:
- Enable Next.js
output: 'standalone'for bothwebandcmsbuilds. - Add Fly.io deploy configuration (
fly.toml), container runtime (Dockerfile+nginx.conf), and docker build context rules (.dockerignore). - Add GitHub Actions workflows for Fly deploy on
mainand Discord PR notifications.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/next.config.ts | Enables standalone output to support Docker runtime packaging. |
| cms/next.config.mjs | Enables standalone output for the CMS Next.js build. |
| Dockerfile | Multi-stage build producing two standalone Next servers plus nginx reverse proxy. |
| nginx.conf | Routes /admin + /api to CMS and everything else to web via nginx. |
| fly.toml | Fly app/service configuration targeting internal port 80. |
| .dockerignore | Reduces Docker build context size by excluding common artifacts. |
| .github/workflows/fly-deploy.yml | Deploys to Fly on pushes to main (and manual dispatch). |
| .github/workflows/notification.yml | Sends Discord notifications on PR opened/reopened/merged. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| concurrency: deploy-group | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: superfly/flyctl-actions/setup-flyctl@master |
|
|
||
| jobs: | ||
| pull_request_created: | ||
| if: github.event_name == 'pull_request' && github.event.action == 'opened' || github.event.action == 'reopened' |
Comment on lines
+10
to
+16
| location /admin { | ||
| proxy_pass http://localhost:3001; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Connection 'upgrade'; | ||
| proxy_set_header Host $host; | ||
| } |
Comment on lines
+10
to
+24
| location /admin { | ||
| proxy_pass http://localhost:3001; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Connection 'upgrade'; | ||
| proxy_set_header Host $host; | ||
| } | ||
|
|
||
| location /api { | ||
| proxy_pass http://localhost:3001; | ||
| proxy_http_version 1.1; | ||
| proxy_set_header Upgrade $http_upgrade; | ||
| proxy_set_header Connection 'upgrade'; | ||
| proxy_set_header Host $host; | ||
| } |
|
|
||
| EXPOSE 80 | ||
|
|
||
| CMD sh -c "nginx -g 'daemon off;' & PORT=3001 node /app/cms/server.js & PORT=3000 node /app/web/server.js & wait" No newline at end of file |
Comment on lines
+33
to
+52
| FROM base AS runner | ||
| WORKDIR /app | ||
|
|
||
| ENV NODE_ENV=production | ||
|
|
||
| # CMS | ||
| COPY --from=cms-builder /app/cms/.next/standalone ./cms/ | ||
| COPY --from=cms-builder /app/cms/.next/static ./cms/.next/static | ||
|
|
||
| # WEB | ||
| COPY --from=web-builder /app/web/.next/standalone ./web/ | ||
| COPY --from=web-builder /app/web/.next/static ./web/.next/static | ||
| COPY --from=web-builder /app/web/public ./web/public | ||
|
|
||
| # nginx | ||
| COPY nginx.conf /etc/nginx/nginx.conf | ||
|
|
||
| EXPOSE 80 | ||
|
|
||
| CMD sh -c "nginx -g 'daemon off;' & PORT=3001 node /app/cms/server.js & PORT=3000 node /app/web/server.js & wait" No newline at end of file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fly Deployment
Type of change
Description