-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feat/render previews #4885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/render previews #4885
Conversation
- Add railway.json for Railway deployment config - Add docker-compose.railway.yml with non-privileged Vespa - Add GitHub workflow for automatic PR deployments - Add nginx config for preview environments - Add setup documentation This enables automatic preview environments for each PR with full Onyx stack
- Add render.yaml for Render Blueprint configuration - Configure compose-based deployment with docker-compose.railway.yml - Set up standard-16 plan (16GB/4vCPU) for preview environments - Add GitHub workflow to deploy preview environments on PR events - Expose port 80 publicly for nginx proxy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@pablonyx is attempting to deploy a commit to the Danswer Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added comprehensive preview environment infrastructure across multiple platforms (Railway and Render) with associated configuration and workflow files for automated PR deployments.
- New
.github/workflows/preview-deploy.ymland.github/workflows/render-preview.ymlautomate preview environment creation, but should address security considerations around API key usage - Added
deployment/docker_compose/docker-compose.railway.ymlwith reduced resource limits and simplified configurations, though requiring security hardening - Introduced
deployment/docker_compose/nginx-preview.confwith streamlined configurations (100M body size vs 5G in production) - Added platform-specific configs (
render.yaml,railway.json) for containerized preview deployments with auto-generated credentials - New
deployment/railway-setup.mdprovides detailed documentation for setting up PR-specific preview deployments
7 files reviewed, 7 comments
Edit PR Review Bot Settings | Greptile
| # Increase client body size for file uploads | ||
| client_max_body_size 100M; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: client_max_body_size is set to 100M while production uses 5G. This significant difference could cause file upload issues in preview environments.
.github/workflows/render-preview.yml
Outdated
| deploy-preview: | ||
| runs-on: ubuntu-latest | ||
| steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Missing checkout step before deployment. Need 'actions/checkout@v4' to access repository files.
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"] | ||
| interval: 30s | ||
| timeout: 10s | ||
| retries: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: API healthcheck is using port 8080 which may conflict with Vespa using the same port (line 101). Consider using different ports or configuring a proxy.
.github/workflows/preview-deploy.yml
Outdated
| name: Deploy Preview Environment | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Missing 'closed' event type in pull_request triggers, but cleanup-preview job depends on it.
| name: Deploy Preview Environment | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| name: Deploy Preview Environment | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] |
render.yaml
Outdated
| - key: RAILWAY_PUBLIC_DOMAIN | ||
| fromService: | ||
| type: compose | ||
| name: onyx-preview | ||
| property: hostport |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: RAILWAY_PUBLIC_DOMAIN is using a circular reference - the service is referencing itself for the hostport property
| "dockerfilePath": "deployment/docker_compose/docker-compose.railway.yml" | ||
| }, | ||
| "deploy": { | ||
| "startCommand": "docker-compose -f deployment/docker_compose/docker-compose.railway.yml up", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: docker-compose up without -d will run in foreground and may cause Railway to think the deployment failed when output stops. Use docker-compose -f deployment/docker_compose/docker-compose.railway.yml up -d
| "builder": "DOCKERFILE", | ||
| "dockerfilePath": "deployment/docker_compose/docker-compose.railway.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: dockerfilePath points to a docker-compose.yml file but builder is set to DOCKERFILE. Should use NIXPACKS or specify the correct Dockerfile path
- Simplify render.yaml to minimal configuration - Add previews.generation: automatic - Fix GitHub action name to preview-environment-action (singular) - Add checkout step to workflow - Remove unnecessary configuration options
- Delete .github/workflows/render-preview.yml - Render will automatically create preview environments with just render.yaml - No GitHub Action needed when previews.generation: automatic is set
- Remove substring() function call which is not supported in GitHub Actions expressions - Display full commit SHA instead of shortened version
- Updated render.yaml to use docker-compose.prod-cloud.yml - Added GitHub workflow for automatic preview environment creation - Configured all services with appropriate environment variables - Set up compose service with standard-16 plan (4 vCPU / 16 GB) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🚀 Updated Render Preview ConfigurationI've updated the configuration to properly support Render Preview Environments: Changes Made:
|
The preview-deploy.yml workflow was using Railway commands but we need Render preview environments instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Render automatically creates preview environments when: 1. A render.yaml exists with previewEnv: true 2. The repository is connected to Render No GitHub workflow is needed. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Description
[Provide a brief description of the changes in this PR]
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.