-
Notifications
You must be signed in to change notification settings - Fork 409
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add app deployment guides for Fly.io, Render, and Railway (#6983)
- Loading branch information
Showing
10 changed files
with
125 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.. _ref_guide_cloud_deploy_fly: | ||
|
||
====== | ||
Fly.io | ||
====== | ||
|
||
:edb-alt-title: Deploying applications built on EdgeDB Cloud to Fly.io | ||
|
||
1. Install the `Fly.io CLI <https://fly.io/docs/hands-on/install-flyctl/>`_ | ||
2. Log in to Fly.io with ``flyctl auth login`` | ||
3. Run ``flyctl launch`` to create a new app on Fly.io and configure it. | ||
It will ask you to select a region and a name for your app. When done it will | ||
create a ``fly.toml`` file and a ``Dockerfile`` in your project directory. | ||
4. Set ``EDGEDB_INSTANCE`` and ``EDGEDB_SECRET_KEY`` as secrets in your Fly.io | ||
app. | ||
|
||
For **runtime secrets**, you can do this by running the following commands: | ||
|
||
.. code-block:: bash | ||
$ flyctl secrets set EDGEDB_INSTANCE <EDGEDB_INSTANCE> | ||
$ flyctl secrets set EDGEDB_SECRET_KEY <EDGEDB_SECRET_KEY> | ||
`Read more about Fly.io runtime secrets | ||
<https://fly.io/docs/reference/secrets/>`_. | ||
|
||
For **build secrets**, you can do this by modifying the ``Dockerfile`` to | ||
mount the secrets as environment variables. | ||
|
||
.. code-block:: dockerfile-diff | ||
:caption: Dockerfile | ||
# Build application | ||
- RUN pnpm run build | ||
+ RUN --mount=type=secret,id=EDGEDB_INSTANCE \ | ||
+ --mount=type=secret,id=EDGEDB_SECRET_KEY \ | ||
+ EDGEDB_INSTANCE="$(cat /run/secrets/EDGEDB_INSTANCE)" \ | ||
+ EDGEDB_SECRET_KEY="$(cat /run/secrets/EDGEDB_SECRET_KEY)" \ | ||
+ pnpm run build | ||
`Read more about Fly.io build secrets | ||
<https://fly.io/docs/reference/build-secrets/>`_. | ||
|
||
5. Deploy your app to Fly.io | ||
|
||
.. code-block:: bash | ||
$ flyctl deploy | ||
If your app requires build secrets, you can pass them as arguments | ||
to the ``deploy`` command: | ||
|
||
.. code-block:: bash | ||
$ flyctl deploy --build-secret EDGEDB_INSTANCE="<EDGEDB_INSTANCE>" \ | ||
--build-secret EDGEDB_SECRET_KEY="<EDGEDB_SECRET_KEY>" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ platform-specific instructions: | |
|
||
vercel | ||
netlify | ||
fly | ||
railway | ||
render |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.. _ref_guide_cloud_deploy_railway: | ||
|
||
======= | ||
Railway | ||
======= | ||
|
||
:edb-alt-title: Deploying applications built on EdgeDB Cloud to Railway | ||
|
||
1. Push project to GitHub or some other Git remote repository | ||
2. Create and make note of a secret key for your EdgeDB Cloud instance | ||
3. From Railway's dashboard, click the "New Project" button | ||
4. Select the repository you want to deploy | ||
5. Click the "Add variables" button to add the following environment variables: | ||
|
||
- ``EDGEDB_INSTANCE`` containing your EdgeDB Cloud instance name (in | ||
``<org>/<instance-name>`` format) | ||
- ``EDGEDB_SECRET_KEY`` containing the secret key you created and noted | ||
previously. | ||
|
||
6. Click "Deploy" | ||
|
||
.. image:: images/cloud-railway-config.png | ||
:width: 100% | ||
:alt: A screenshot of the Railway deployment configuration view | ||
highlighting the environment variables section where a user will | ||
need to set the necessary variables for EdgeDB Cloud instance | ||
connection. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. _ref_guide_cloud_deploy_render: | ||
|
||
====== | ||
Render | ||
====== | ||
|
||
:edb-alt-title: Deploying applications built on EdgeDB Cloud to Render | ||
|
||
1. Push project to GitHub or some other Git remote repository | ||
2. Create and make note of a secret key for your EdgeDB Cloud instance | ||
3. From Render's dashboard, click "New > Web Service" | ||
4. Import your project's repository | ||
5. In the setup page, scroll down to the "Environment Variables" section and | ||
add the following environment variables: | ||
|
||
- ``EDGEDB_INSTANCE`` containing your EdgeDB Cloud instance name (in | ||
``<org>/<instance-name>`` format) | ||
- ``EDGEDB_SECRET_KEY`` containing the secret key you created and noted | ||
previously. | ||
|
||
6. Click Deploy | ||
|
||
.. image:: images/cloud-render-config.png | ||
:width: 100% | ||
:alt: A screenshot of the Render deployment configuration view | ||
highlighting the environment variables section where a user | ||
will need to set the necessary variables for EdgeDB Cloud instance | ||
connection. |
This file contains 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
This file contains 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
This file contains 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