diff --git a/docs/ce/self-host/self-host-on-railway.mdx b/docs/ce/self-host/self-host-on-railway.mdx new file mode 100644 index 000000000..4fc615eb2 --- /dev/null +++ b/docs/ce/self-host/self-host-on-railway.mdx @@ -0,0 +1,49 @@ +--- +title: "Self Host on Railway" +--- + +This guide will show you how to set up digger on [Railway](https://railway.com). + +This is a specific case of [Deploy as docker image](./deploy-docker). + +![](/images/self-host/railway/canvas.png) + +1. Use the following template. It will create the Digger + PostgreSQL services and prepopulate many of the necessary environment variables. + + [![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/VByV1N?referralCode=P06La2) + + 📢 DISCLOSURE: This template was created by [@sidpalas](https://github.com/sidpalas). He will recieve a (small) payment if you use it from the [Railway template kickback program](https://railway.com/open-source-kickback). + +2. Set your GitHub organization name (or username, if the repo you plan to use belongs to an individual user). + + ![](/images/self-host/railway/set-github-org.png) + +3. Deploy. + +4. Navigate to the pubilc domain for the Digger service (`Settings > Public Networking`). + + ![](/images/self-host/railway/digger-live.png) + +5. Create the GitHub App + + Navigate to `your_digger_hostname/github/setup` and sign in with the `HTTP_BASIC_AUTH_USERNAME` and `HTTP_BASIC_AUTH_PASSWORD` values. + + These are geneated automatically by Railway when performing the initial deployment and can be retrieved from the `Variables` tab for the Digger service. + + ![](/images/self-host/railway/github-app-setup.png) + +6. After creating the GitHub app, copy the provided values into their corresponding environment variables (overwriting the placeholder `REPLACE_ME_AFTER_GH_APP_CREATION` values): + + ```bash + GITHUB_APP_ID= + GITHUB_APP_CLIENT_ID= + GITHUB_APP_CLIENT_SECRET= + GITHUB_APP_PRIVATE_KEY_BASE64= + GITHUB_WEBHOOK_SECRET= + ``` + + 💡 **Tip:** When copying base64 values (e.g. the app key file), double clicking the text often does NOT select any trailing `=` characters. Make sure to copy them too! + +7. Redeploy. + +8. Create a PR to verify Digger is working properly. diff --git a/docs/docs.json b/docs/docs.json index 580f98a31..1b9e62432 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -129,7 +129,8 @@ "ce/self-host/deploy-docker-compose", "ce/self-host/deploy-binary", "ce/self-host/deploy-helm", - "ce/self-host/self-host-on-azure" + "ce/self-host/self-host-on-azure", + "ce/self-host/self-host-on-railway" ] }, { @@ -223,4 +224,4 @@ "linkedin": "https://www.linkedin.com/company/diggerhq/" } } -} +} \ No newline at end of file diff --git a/docs/images/self-host/railway/canvas.png b/docs/images/self-host/railway/canvas.png new file mode 100644 index 000000000..f1a7abb1b Binary files /dev/null and b/docs/images/self-host/railway/canvas.png differ diff --git a/docs/images/self-host/railway/digger-live.png b/docs/images/self-host/railway/digger-live.png new file mode 100644 index 000000000..04cfdf1ee Binary files /dev/null and b/docs/images/self-host/railway/digger-live.png differ diff --git a/docs/images/self-host/railway/github-app-setup.png b/docs/images/self-host/railway/github-app-setup.png new file mode 100644 index 000000000..132f0e242 Binary files /dev/null and b/docs/images/self-host/railway/github-app-setup.png differ diff --git a/docs/images/self-host/railway/set-github-org.png b/docs/images/self-host/railway/set-github-org.png new file mode 100644 index 000000000..d52e218c5 Binary files /dev/null and b/docs/images/self-host/railway/set-github-org.png differ