Skip to content

Latest commit

 

History

History
35 lines (19 loc) · 4.4 KB

File metadata and controls

35 lines (19 loc) · 4.4 KB

Deployment guide

Deploy on Railway

  1. Click the button above to start deploying to Railway. You will need to sign in with a Github account.

  2. There are two packages you will need to deploy. One is the frontend UI, and the other is the Ponder indexing service. Click configure to start configuring the frontend package. Under repository details, enter the name you want to use for your project. Railway will automatically clone the repo to your Github account with this name. Here we need to set the NEXT_PUBLIC_ALCHEMY_API_KEY environment variable. You can get an alchemy API key by going to Alchemy and signing up for their service. You will also need to provide an environment variable NEXT_PUBLIC_PONDER_PUBLIC_URL, and NEXT_PUBLIC_BASE_URL, but for now we can ignore these since we do not yet know the public urls (we need to deploy the services first.) Click save config.

Screenshot 2024-01-29 at 8 05 48 AM Screenshot 2024-01-29 at 8 06 51 AM
  1. Configure the ponder package. Here we also need to set the NEXT_PUBLIC_ALCHEMY_API_KEY environment variable. You can use the same alchemy API key as before. Click save config.
Screenshot 2024-01-29 at 8 07 06 AM
  1. Once the project is deployed you will see three services. Click on the Ponder service. Now click on settings, then networking. Hover over public networking and copy the URL. It should look something like ponder-production-f009.up.railway.app. This is the public URL of the ponder indexing service, which we will need to copy into the frontend UI package.
Screenshot 2024-01-29 at 8 28 37 AM Screenshot 2024-01-29 at 8 16 34 AM
  1. Click on frontend, then variables. Find NEXT_PUBLIC_PONDER_PUBLIC_URL and click on the three dots to the right to edit it. Enter the ponder URL you copied in the last step. We will need to prepend https:// to the start of the URL, so it looks like https://ponder-production-f009.up.railway.app. Now click the check to save.
Screenshot 2024-01-29 at 8 31 06 AM
  1. In order to propogate these changes, click deploy, which will be hovering over the three services on the left. Now your services are ready to go. Wait a few minutes for them to finish building. Once they are finished they will have a green checkmark.
Screenshot 2024-01-29 at 8 19 10 AM
  1. Now do the same for NEXT_PUBLIC_BASE_URL. First go to the frontend service, and click deployments. Copy the URL in the most recent deployment. Next go to variables, and find NEXT_PUBLIC_BASE_URL. Click the 3 dots to edit the variable, and paste in the deployment URL. Make sure to add https:// to the start. Next follow the same step 6 to propogate these changes.

  2. To view your app, click on frontend, then deployments. Click the URL in the most recent deployment. You will need to make sure the build is finished before clicking.

Screenshot 2024-01-29 at 8 30 20 AM
  1. Out of the box, the groupos.config.js comes with a sensible default. You can set your own to add your own tokens. In order to do so, go to the github repo that was created by Railway. It should be in your own profile under the name you set in step 2. Once you are on the repo page, go to packages, then directory, then groupos.config.js. You can click the pencil icon in the top right to edit in Github. Once you are satisfied with your changes, click save, which will automatically trigger a new deployment on Railway.