From c5a95218b065a9e8c29bc5b8f4b1ca8256b90ecc Mon Sep 17 00:00:00 2001 From: Melissa Hale Date: Wed, 20 Sep 2023 18:16:26 -0600 Subject: [PATCH 1/3] add new sidebar menu for guides and heroku migration doc so far --- src/data/sidebar.ts | 6 +++ src/docs/guides/migrate-from-heroku.md | 53 +++++++++++++++++++++++++ src/docs/reference/compare-to-heroku.md | 12 +----- 3 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 src/docs/guides/migrate-from-heroku.md diff --git a/src/data/sidebar.ts b/src/data/sidebar.ts index 404d2ada7..73609f490 100644 --- a/src/data/sidebar.ts +++ b/src/data/sidebar.ts @@ -95,4 +95,10 @@ export const sidebarContent: ISidebarContent = [ makePage("Compare to Heroku", "reference"), ], }, + { + title: "Guides", + pages: [ + makePage("Migrate from Heroku", 'guides') + ] + }, ]; diff --git a/src/docs/guides/migrate-from-heroku.md b/src/docs/guides/migrate-from-heroku.md new file mode 100644 index 000000000..5206a9b70 --- /dev/null +++ b/src/docs/guides/migrate-from-heroku.md @@ -0,0 +1,53 @@ +--- +title: Migrate from Heroku +--- + +Getting your app hosted on Heroku moved over to Railway is very simple. + +All you need to do is connect your GitHub account, create a new project, and then deploy your repo. We even support Procfiles out of the box. (Only a single process is supported for now). + + +## Create a New Project in Railway + +First, create a new [project](develop/projects) from your Dashboard. + +Press the Command + K key combination and type "New Project". + + + +Under the list of options in the menu, select "Empty Project". + +## Configure your Service + +Words about adding your environment variables from Heroku + + +## Deploy your Service + +If you haven't already, install the [Railway CLI](/develop/cli) and login: +```bash +railway login +``` + + + +### Connect to Project Using CLI + +Once you've logged in, link to your project by running: +```bash +railway link +``` + +### Trigger your Deployment + +From a [linked project](/develop/cli#link-to-a-project) run: +```bash +railway up +``` + +## Need Help? + +If you run into any issues, we would be more than happy to answer your questions on our [Discord](https://discord.gg/railway) or over email at team@railway.app \ No newline at end of file diff --git a/src/docs/reference/compare-to-heroku.md b/src/docs/reference/compare-to-heroku.md index 5ed8aa782..fcaaf6570 100644 --- a/src/docs/reference/compare-to-heroku.md +++ b/src/docs/reference/compare-to-heroku.md @@ -67,14 +67,4 @@ We feel no project, big or small- is never not important. This is our guiding ph As a result, we make great pains to be very communicative in our support channels, [optimistically gather feedback](https://feedback.railway.app/), provide informative docs, and encourage our community to help each other. -Having an issue with a deployment? [Join over 5k Railway users on our Discord Server!](https://discord.gg/railway) With our dedicated support channels, you can get help from the Railway team and our community of builders. - -## Moving From Heroku to Railway - -Getting your app hosted on Heroku moved over to Railway is very simple. - -All you need to do is connect your GitHub account, create a new project, and then deploy your repo. We even support Procfiles out of the box. (Only a single process is supported for now) - -If you want to learn in-depth about our product, the [Getting Started guide](/getting-started) that will walk you through the process. - -If you run into any issues, we would be more than happy to answer your questions on our [Discord](https://discord.gg/railway) or over email at team@railway.app +Having an issue with a deployment? [Join over 5k Railway users on our Discord Server!](https://discord.gg/railway) With our dedicated support channels, you can get help from the Railway team and our community of builders. \ No newline at end of file From fe00d99ee418422b1bc673faa0506fca6ab852b1 Mon Sep 17 00:00:00 2001 From: Melissa Hale Date: Tue, 26 Sep 2023 17:15:27 -0500 Subject: [PATCH 2/3] finish draft of heroku migration guide --- src/docs/guides/migrate-from-heroku.md | 95 +++++++++++++++++++------- 1 file changed, 72 insertions(+), 23 deletions(-) diff --git a/src/docs/guides/migrate-from-heroku.md b/src/docs/guides/migrate-from-heroku.md index 5206a9b70..7c5bf64f1 100644 --- a/src/docs/guides/migrate-from-heroku.md +++ b/src/docs/guides/migrate-from-heroku.md @@ -2,52 +2,101 @@ title: Migrate from Heroku --- -Getting your app hosted on Heroku moved over to Railway is very simple. +Migrating your app from Heroku to Railway is very simple. We even support Procfiles out of the box. (Only a single process is supported for now). -All you need to do is connect your GitHub account, create a new project, and then deploy your repo. We even support Procfiles out of the box. (Only a single process is supported for now). +All you need to do is create a project in Railway, push your code, and migrate your envionment variables. +This guide will step you through the process of migrating a simple web service, using the [Railway CLI](/develop/cli). -## Create a New Project in Railway - -First, create a new [project](develop/projects) from your Dashboard. + -Press the Command + K key combination and type "New Project". +## Working Directory - +In your terminal, ensure your current working directory is the same directory where your service code is located. -Under the list of options in the menu, select "Empty Project". +This is important so that as you complete the following steps, the Railway CLI is properly linked. -## Configure your Service +## Login to Railway from the CLI -Words about adding your environment variables from Heroku +Ensure your CLI is authenticated to your Railway account: +```bash +railway login +``` +This command will prompt to open a browser to complete authentication. Once authenticated, commands executed by the Railway CLI, will be performed in the context of your Railway account. -## Deploy your Service +## Create a New Project -If you haven't already, install the [Railway CLI](/develop/cli) and login: +Now, let's create a new [project](develop/projects): ```bash -railway login +railway init ``` +This command will prompt you to define a name for your service. -### Connect to Project Using CLI +## Deploy the Service -Once you've logged in, link to your project by running: +Once your project is created, you can push your code into the project and assign a domain. + +### Push the Code + +Push the code into a service in Railway: ```bash -railway link +railway up -d ``` -### Trigger your Deployment +At this point, the service is being deployed, but let's give it a Domain. -From a [linked project](/develop/cli#link-to-a-project) run: +### Assign a Domain + +The service we are migrating is a web service that should be available over the Internet, so let's assign a Domain: ```bash -railway up +railway domain ``` +Now the service will be available over the Internet via the provided Domain. + +## Migrate the Environment Variables + +Finally, we will import the environment variables from Heroku into Railway. + + + +### Open the Project in Railway + +Let's open over our new Railway project in the UI: +```bash +railway open +``` + +This will open the project in your browser. + +### Add Heroku Variables to the Service + +From the project canvas, import the Heroku variables into the service: +- click on the service +- click `Variables` tab +- open the command palette using `CMD + K` or `Ctrl + K`. +- search for `Import variables from Heroku` +- confirm the Heroku service and hit `Enter` + +Your Heroku variables will be imported into the service, and it will automatically redeploy. + +_Note: The first time you import variables from Heroku, you will be prompted to Allow Railway to connec to your Heroku account._ + +## Conclusion + +Following this guide, we have successfully migrated a simple web service from Heroku to Railway including importing Heroku variables. + +For more advanced operations, like migrating your databases from Heroku to Railway, the process will be a bit more involved, but we are happy to help work out a solution! + ## Need Help? -If you run into any issues, we would be more than happy to answer your questions on our [Discord](https://discord.gg/railway) or over email at team@railway.app \ No newline at end of file +If you run into any issues, or would like help with your migrations, we would be more than happy to answer your questions on our [Discord](https://discord.gg/railway) or over email at [team@railway.app](mailto:team@railway.app). \ No newline at end of file From 4fee4c6b932396e4ea9925636d2274d784ad3222 Mon Sep 17 00:00:00 2001 From: Melissa Hale Date: Wed, 27 Sep 2023 16:31:27 -0500 Subject: [PATCH 3/3] polish --- src/docs/guides/migrate-from-heroku.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/docs/guides/migrate-from-heroku.md b/src/docs/guides/migrate-from-heroku.md index 7c5bf64f1..5bf293e7b 100644 --- a/src/docs/guides/migrate-from-heroku.md +++ b/src/docs/guides/migrate-from-heroku.md @@ -17,7 +17,7 @@ width={700} height={464} quality={80} /> In your terminal, ensure your current working directory is the same directory where your service code is located. -This is important so that as you complete the following steps, the Railway CLI is properly linked. +This is important so that as you complete the following steps, the [Railway CLI](/develop/cli) is properly linked. ## Login to Railway from the CLI @@ -44,34 +44,34 @@ Once your project is created, you can push your code into the project and assign ### Push the Code -Push the code into a service in Railway: +Push the code into a [service](/develop/services) in Railway: ```bash railway up -d ``` -At this point, the service is being deployed, but let's give it a Domain. +At this point, the service is being deployed, but let's give it a domain. ### Assign a Domain -The service we are migrating is a web service that should be available over the Internet, so let's assign a Domain: +The service we are migrating is a web service that should be available over the Internet, so let's assign a domain: ```bash railway domain ``` -Now the service will be available over the Internet via the provided Domain. +Now the service will be available over the Internet via the provided domain. ## Migrate the Environment Variables Finally, we will import the environment variables from Heroku into Railway. ### Open the Project in Railway -Let's open over our new Railway project in the UI: +Let's pop over to our new project in the [Railway canvas](/develop/projects).: ```bash railway open ``` @@ -89,11 +89,13 @@ From the project canvas, import the Heroku variables into the service: Your Heroku variables will be imported into the service, and it will automatically redeploy. -_Note: The first time you import variables from Heroku, you will be prompted to Allow Railway to connec to your Heroku account._ +_Note: The first time you import variables from Heroku, you will be prompted to Allow Railway to connect to your Heroku account._ ## Conclusion -Following this guide, we have successfully migrated a simple web service from Heroku to Railway including importing Heroku variables. +Following this guide, we have successfully migrated a simple web service from Heroku to Railway, including importing variables from Heroku into Railway. + +We have completed the migration by pushing our code directly from our local machine into a service in Railway. Once you are comfortable with Railway, you may want to integrate [deployments](/deploy/deployments) into your development workflow. For more advanced operations, like migrating your databases from Heroku to Railway, the process will be a bit more involved, but we are happy to help work out a solution!