Support for preview environments
psirenny opened this issue · 0 comments
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
a9dae46e-bb96-448e-98ad-f79284d214e2
Describe your problem
Preview environments are typically created/destroyed when a GitHub pull request is opened/closed. They're a convenient way to test pull request changes in isolation in a production-like environment.
We use Vercel Preview Deployments and Neon Postgres Branches to spin up short lived environments every time a GitHub pull request is opened. It would be awesome if there were a way to connect our preview deployments to a short lived project in Ory Network.
Describe your ideal solution
Our ideal solution would allow us to add a GitHub Action to our pull request workflows that allow us to create/destroy a preview project. Something like:
name: Preview
on:
pull_request
jobs:
preview:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- name: Deploy to Ory Network
uses: ory/preview-deploy@v1.0.0
with:
workspace-id: ${{ vars.ORY_WORKSPACE_ID }}
identity-config-file-path: identity-config.production.yaml
username: ${{ vars.ORY_USERNAME }}
password: ${{ secrets.ORY_PASSWORD }}
Workarounds or alternatives
We currently share a staging project with all of our preview deployments. But this is error prone because changes made in one preview deployment then effect all the other deployments. We considered dynamically creating staging environments in a GitHub Action workflow, but were deterred by the work involved and the 5 staging environment limit per workspace.
One strategy we haven't pursued yet is using multi-tenancy to create preview environments. As an aside, there are challenges to setting up cookies to work with Vercel preview deployment domains. But I suppose that's a whole other discussion 😆.
Version
CLI v0.3.4
Additional Context
No response