Skip to content
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

Support for preview environments #381

Open
5 tasks done
psirenny opened this issue Apr 19, 2024 · 0 comments
Open
5 tasks done

Support for preview environments #381

psirenny opened this issue Apr 19, 2024 · 0 comments
Labels
feat New feature or request.

Comments

@psirenny
Copy link

psirenny commented Apr 19, 2024

Preflight checklist

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/[email protected]
      - name: Deploy to Ory Network
        uses: ory/[email protected]
        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

@psirenny psirenny added the feat New feature or request. label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant