From 09538f63176ac617e1fe41e7bfadfa0247e5da33 Mon Sep 17 00:00:00 2001 From: Faraz Patankar Date: Tue, 4 May 2021 00:09:11 +0400 Subject: [PATCH] change connection command from init to link (#86) --- examples/blitzjs/README.md | 2 +- examples/discordjs/README.md | 2 +- examples/djangopy/README.md | 2 +- examples/elixir-phoenix/README.md | 4 ++-- examples/expressjs-postgres/README.md | 2 +- examples/expressjs-prisma/README.md | 2 +- examples/expressjs/README.md | 2 +- examples/http-nodejs/README.md | 2 +- examples/laravel/README.md | 16 ++++++++-------- examples/nextjs-prisma/README.md | 2 +- examples/rails-blog/README.md | 2 +- examples/rails-starter/README.md | 2 +- examples/sinatra/README.md | 2 +- examples/slack-webhook/README.md | 2 +- examples/svelte-kit/README.md | 2 +- examples/telegram-bot/README.md | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/examples/blitzjs/README.md b/examples/blitzjs/README.md index d85be57..4ed3fb8 100644 --- a/examples/blitzjs/README.md +++ b/examples/blitzjs/README.md @@ -14,7 +14,7 @@ Railway Postgres database. ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://dev.new) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Migrate the database `railway run blitz prisma migrate` - Run the Blitz app `railway run yarn dev` diff --git a/examples/discordjs/README.md b/examples/discordjs/README.md index 73c84d8..4288a63 100644 --- a/examples/discordjs/README.md +++ b/examples/discordjs/README.md @@ -12,7 +12,7 @@ This example starts a Discord bot using [discord.js](https://discord.js.org/#/). ## 💁‍♀️ How to use - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the bot `railway run yarn dev` ## 📝 Notes diff --git a/examples/djangopy/README.md b/examples/djangopy/README.md index 2ebe25a..6c84d3e 100644 --- a/examples/djangopy/README.md +++ b/examples/djangopy/README.md @@ -13,7 +13,7 @@ This is a [Django](https://www.djangoproject.com/) application that connects to ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Install Python requirements `pip install -r requirements.txt` - Migrate the database `railway run python3 manage.py migrate` - Run Django `railway run python3 manage.py runserver` diff --git a/examples/elixir-phoenix/README.md b/examples/elixir-phoenix/README.md index 0d0b5f0..d7966dd 100644 --- a/examples/elixir-phoenix/README.md +++ b/examples/elixir-phoenix/README.md @@ -14,7 +14,7 @@ connects to a Railway Postgres database. ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Install dependencies with `railway run mix deps.get` - Migrate the database `railway run mix ecto.migrate` - Install node dependencies with `cd assets && npm install` @@ -22,6 +22,6 @@ connects to a Railway Postgres database. ## 📝 Notes -This example was generated by running `mix phx.new`. +This example was generated by running `mix phx.new`. Read more about Phoenix at their [official documentation](https://hexdocs.pm/phoenix/api-reference.html#content). diff --git a/examples/expressjs-postgres/README.md b/examples/expressjs-postgres/README.md index 9323b3e..7da27c5 100644 --- a/examples/expressjs-postgres/README.md +++ b/examples/expressjs-postgres/README.md @@ -15,7 +15,7 @@ to a Railway PostgreSQL database. - Install dependencies `yarn` - [Create a Railway project with the Postgres plugin](https://dev.new) -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the server `railway run yarn dev` ## 📝 Notes diff --git a/examples/expressjs-prisma/README.md b/examples/expressjs-prisma/README.md index 49b7351..df7bafd 100644 --- a/examples/expressjs-prisma/README.md +++ b/examples/expressjs-prisma/README.md @@ -15,7 +15,7 @@ This is an [ExpressJS](https://expressjs.com/) REST API that uses [Prisma](https - Install dependencies `yarn` - [Provision a Postgres container on Railway](https://dev.new) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Migrate the database `railway run yarn migrate:dev` - Run the Server app `railway run yarn dev` diff --git a/examples/expressjs/README.md b/examples/expressjs/README.md index 13bffa8..df4e3f8 100644 --- a/examples/expressjs/README.md +++ b/examples/expressjs/README.md @@ -12,7 +12,7 @@ This example starts an [ExpressJS](https://expressjs.com/) server. ## 💁‍♀️ How to use - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the development server `railway run yarn dev` ## 📝 Notes diff --git a/examples/http-nodejs/README.md b/examples/http-nodejs/README.md index fd5d77c..922c2bf 100644 --- a/examples/http-nodejs/README.md +++ b/examples/http-nodejs/README.md @@ -7,7 +7,7 @@ This example starts an [HTTP Module](https://nodejs.org/api/http.html) server. ## 💁‍♀️ How to use - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the development server `railway run yarn dev` ## 📝 Notes diff --git a/examples/laravel/README.md b/examples/laravel/README.md index 0e99f95..3b99365 100644 --- a/examples/laravel/README.md +++ b/examples/laravel/README.md @@ -13,14 +13,14 @@ This is a [Laravel](https://laravel.com/) starter app that connects to a Railway ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` ## 📝 Notes - - **Dockerfile**: The `Dockerfile` and associated files in `docker/` are based on [Laravel Sail PHP 8.0](https://github.com/laravel/sail/tree/1.x/runtimes/8.0) - - **Plugin Config**: To connect to a Railway Plugin, Postgres for example, you will need to utilize the environment variables listed for that plugin in the [Railway Docs](https://docs.railway.app/). - See the `.env.example` for an example of using these with Postgres. - - **Web server port**: Railway dynamically assigns a port for your webserver. We grab the `$PORT` environment variable in `docker/start-container` to set this on Artisan `serve` - - **Logging**: Because the disk on Railway containers is ephemeral, we pipe the logs normally output to `storage/logs/laravel.log` to `stdout` [as seen here](https://github.com/sorrell/railavel/commit/2802b8c5032a13a601a903276ee2181678009f67) - - **APP_KEY**: This starter will automatically generate the `APP_KEY` (`php artisan key:generate` in the `docker/start-container`) - - **Migrations**: This starter automatically runs migrations on deploy (in the `docker/start-container`) \ No newline at end of file +- **Dockerfile**: The `Dockerfile` and associated files in `docker/` are based on [Laravel Sail PHP 8.0](https://github.com/laravel/sail/tree/1.x/runtimes/8.0) +- **Plugin Config**: To connect to a Railway Plugin, Postgres for example, you will need to utilize the environment variables listed for that plugin in the [Railway Docs](https://docs.railway.app/). + See the `.env.example` for an example of using these with Postgres. +- **Web server port**: Railway dynamically assigns a port for your webserver. We grab the `$PORT` environment variable in `docker/start-container` to set this on Artisan `serve` +- **Logging**: Because the disk on Railway containers is ephemeral, we pipe the logs normally output to `storage/logs/laravel.log` to `stdout` [as seen here](https://github.com/sorrell/railavel/commit/2802b8c5032a13a601a903276ee2181678009f67) +- **APP_KEY**: This starter will automatically generate the `APP_KEY` (`php artisan key:generate` in the `docker/start-container`) +- **Migrations**: This starter automatically runs migrations on deploy (in the `docker/start-container`) diff --git a/examples/nextjs-prisma/README.md b/examples/nextjs-prisma/README.md index a3bb85d..1902231 100644 --- a/examples/nextjs-prisma/README.md +++ b/examples/nextjs-prisma/README.md @@ -15,7 +15,7 @@ This example is a [NextJS](https://nextjs.org/) todo app that uses ## 💁‍♀️ How to use - [Provision a Postgres container on Railway](https://dev.new) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Migrate the database `railway run yarn migrate:dev` - Run the NextJS app `railway run yarn dev` diff --git a/examples/rails-blog/README.md b/examples/rails-blog/README.md index 164eefe..8a39436 100644 --- a/examples/rails-blog/README.md +++ b/examples/rails-blog/README.md @@ -13,7 +13,7 @@ This is a [Ruby on Rails](https://rubyonrails.org/) blog that connects to a Rail ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Install Ruby requirements `bundle install` - Migrate the database `railway run rake db:migrate` - Run Rails `railway run bin/rails server` diff --git a/examples/rails-starter/README.md b/examples/rails-starter/README.md index b72e6ef..c751336 100644 --- a/examples/rails-starter/README.md +++ b/examples/rails-starter/README.md @@ -13,7 +13,7 @@ This is a [Ruby on Rails](https://rubyonrails.org/) starter app that connects to ## 💁‍♀️ How to use - [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql) -- Connect to your Railway project with `railway init` +- Connect to your Railway project with `railway link` - Install Ruby requirements `bundle install` - Migrate the database `railway run rake db:migrate` - Run Rails `railway run bin/rails server` diff --git a/examples/sinatra/README.md b/examples/sinatra/README.md index ea418bb..7f30368 100644 --- a/examples/sinatra/README.md +++ b/examples/sinatra/README.md @@ -11,6 +11,6 @@ This example is a simple [Sinatra](http://sinatrarb.com) webserver. ## 💁‍♀️ How to use -- Create Railway project `railway init` +- Connect to your Railway project `railway link` - Install Ruby requirements `bundle install` - Run Sinatra `railway run ruby app.rb` diff --git a/examples/slack-webhook/README.md b/examples/slack-webhook/README.md index 529f2fc..f2d1b24 100644 --- a/examples/slack-webhook/README.md +++ b/examples/slack-webhook/README.md @@ -15,7 +15,7 @@ This example starts an [ExpressJS](https://expressjs.com/) server containing a p - Create a Slack app with an [incoming webhook](https://api.slack.com/messaging/webhooks). - Click the deploy button and add the `SLACK_WEBHOOK_URL`. - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the development server `railway run yarn dev` ## 📝 Notes diff --git a/examples/svelte-kit/README.md b/examples/svelte-kit/README.md index 72d3b65..72db8de 100644 --- a/examples/svelte-kit/README.md +++ b/examples/svelte-kit/README.md @@ -12,7 +12,7 @@ This examples is a simple [SvelteKit](https://kit.svelte.dev/) app. ## 💁‍♀️ How to use - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the development server `railway run yarn dev` ## 📝 Notes diff --git a/examples/telegram-bot/README.md b/examples/telegram-bot/README.md index 64fdfa7..df1e50f 100644 --- a/examples/telegram-bot/README.md +++ b/examples/telegram-bot/README.md @@ -13,7 +13,7 @@ This example starts a [Telegram](https://telegram.org/) bot on an [ExpressJS](ht ## 💁‍♀️ How to use - Install dependencies `yarn` -- Connect to your Railway project `railway init` +- Connect to your Railway project `railway link` - Start the development server `railway run yarn dev` ## 📝 Notes