Railway
One-click Deploy Example
Deploy an example project
https://github.com/joshstevens19/rindexer/tree/master/providers/railway
- Clone the relevant directory
# this will clone the railway directory
mkdir rindexer-railway && cd rindexer-railway
git clone \
--depth=1 \
--no-checkout \
--filter=tree:0 \
https://github.com/joshstevens19/rindexer .
git sparse-checkout set --no-cone providers/railway .
git checkout && cp -r providers/railway/* . && rm -rf providers
- Initialize a new Railway project
railway init --name rindexer-example
- Create a service and link it to the project
railway up --detach
railway link
? Select a project
> rindexer-example
? Select an environment
> production
? Select a service
> rindexer-example
- Create a Postgres database
railway add --database postgre-sql
- Configure environment variables
railway open
- then open the service "Variables" tab and click on "Add Variable Reference" and select
DATABASE_URL
, - postfix
?sslmode=disable
to the end of the value. It should look like this:${{Postgres.DATABASE_URL}}?sslmode=disable
, - hit "Deploy" or Shift+Enter.
- Create a domain to access GraphQL Playground
railway domain
- Redeploy the service
railway up