Skip to content

Commit

Permalink
feat: move stuff to railway (#366)
Browse files Browse the repository at this point in the history
* feat: move stuff to railway

* docs(deployment): add railway deploy instructions

* ci(gh-actions): deploy to railway

* build(backend): bump version

* ci: change fly toml location
  • Loading branch information
IgnisDa authored Sep 26, 2023
1 parent 661aec1 commit aac36f9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up flyctl
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set up Railway CLI
run: npm install --global @railway/cli

- name: Deploy to fly
run: flyctl deploy --remote-only --detach
- name: Deploy to Railway
run: railway up
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}

deploy-docs:
# otherwise the docs dislay the incorrect version
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<p align="center">
<a href="https://ignisda.github.io/ryot" target="_blank" rel="noopener noreferrer">Documentation</a> •
<a href="https://ignisda.github.io/ryot/configuration" target="_blank" rel="noopener noreferrer">Configuration</a> •
<a href="https://ryot.fly.dev" target="_blank" rel="noopener noreferrer">Demo</a>
<a href="https://ryot.up.railway.app" target="_blank" rel="noopener noreferrer">Demo</a>
</p>

<br/>
Expand All @@ -31,9 +31,9 @@ hosted tracker you will ever need!

## 💻 Demo

You can use the demo instance hosted on [Fly.io](https://ryot.fly.dev). Login and register
with the username `demo` and password `demo-password`. This instance is automatically
deployed from the latest release.
You can use the demo instance hosted on [Railway](https://ryot.up.railway.app/). Login
and register with the username `demo` and password `demo-password`. This instance
is automatically deployed from the latest release.

**NOTE**: The data in this instance can be deleted randomly.

Expand Down
2 changes: 1 addition & 1 deletion apps/backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ryot"
version = "2.18.6"
version = "2.18.7"
edition = "2021"
repository = "https://github.com/IgnisDa/ryot"
license = "GPL-V3"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/content/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _UPPER_SNAKE_CASE_ the characters. For example, `video_games.twitch.client_id`
becomes `VIDEO_GAMES_TWITCH_CLIENT_ID`.

Ryot serves the final configuration loaded at the `/config` endpoint as JSON
([example](https://ryot.fly.dev/config)). This can also be treated as a [health
([example](https://ryot.up.railway.app/config)). This can also be treated as a [health
endpoint](https://learn.microsoft.com/en-us/azure/architecture/patterns/health-endpoint-monitoring).

!!! info
Expand Down
13 changes: 12 additions & 1 deletion docs/content/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ The easiest way to deploy Ryot is using the docker
[image](https://github.com/IgnisDa/ryot/pkgs/container/ryot). Here is a
non-exhaustive set of guides to deploy Ryot.

## Railway

1. Click on "+ New Project" on your dashboard and select "Empty project".
2. Once the project is created click on "+ New" and select "Database" and then
"Add PostgreSQL".
3. Click on "+ New" again and select "Docker Image". Type `ghcr.io/ignisda/ryot`
and hit Enter.
4. Click on the newly created service and go to the "Variables" section. Click on
"New Variable" and then "Add Reference". Click on "Add".
5. Go to the "Settings" tab and then click on "Generate Domain".

## Dokku

This is a script that automatically sets up a Ryot server using the docker image
Expand Down Expand Up @@ -86,7 +97,7 @@ are required to deploy to Fly.
flyctl postgres create ryot-db
```

2. Copy the [`fly.toml`]({{ extra.file_path }}/fly.toml) in the root of this
2. Copy the [`fly.toml`]({{ extra.file_path }}/config/fly.toml) file from this
repository to your own repository. You **WILL** have to change the `app` key to
a name of your choosing. Deploy it using the below command.
`bash
Expand Down
2 changes: 1 addition & 1 deletion docs/content/guides/fitness.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Some pointers on Ryot and fitness tracking.
Before you can get exercises tracking working, you will need to import all
exercises data. Follow these steps to do so:

1. Open your instance's `/graphql` endpoint. For example `https://ryot.fly.dev/graphql`.
1. Open your instance's `/graphql` endpoint. For example `https://ryot.up.railway.app/graphql`.

2. Enter the following mutation in the editor and run it.
```graphql
Expand Down

0 comments on commit aac36f9

Please sign in to comment.