Skip to content

Commit

Permalink
Environment backup
Browse files Browse the repository at this point in the history
Railway and Northflank
  • Loading branch information
psonnera committed Jun 18, 2024
1 parent 4012c1e commit 2ec07df
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/troubleshoot/heroku.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ WEB_CONCURRENCY="1"
WEB_MEMORY="512"`

```{warning}
Save this file in a safe place
Save this file in a safe place.</br>Call it `heroku.env` as it's your Heroku environment variables.
```

</br>
Expand Down
62 changes: 62 additions & 0 deletions docs/troubleshoot/northflank.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,66 @@ Wait until restart is complete with the cloud status `Running`.

If your site crashes again shortly after, verify your [database is not full](/troubleshoot/atlas.md#database-full) if you use MongoDB Atlas.

</br>

## Backup your site variables

Having a copy of your variables is very important since some of them are vital to your site like MONGODB_URI and your access to it like API_SECRET.

Open [Northflank](https://app.northflank.com/login) and login with your username or with GitHub.

<img src="/vendors/northflank/img/Northflank30.png" width="400px" />

</br>

Select `Services ` then your Nightscout project.

<img src="/vendors/northflank/img/Northflank31.png" width="600px" />

</br>

Select `Environment` then `Env`.

<img src="/vendors/northflank/img/Northflank39.png" width="600px" />

</br>

Copy the contents of the `Environment variables` and paste it into a text editor.

<img src="/vendors/northflank/img/Northflank41.png" width="600px" />

</br>

```{warning}
Save this file in a safe place.</br>Call it `northflank.env` as it's your Northflank environment variables.
```

</br>

## Restore your site variables

You can use this method to restore Northflank variables (see above how to backup), but also to restore them from [Railway](/troubleshoot/railway.md#backup-your-site-variables) or [Heroku](/troubleshoot/heroku.md#method-2-export) if migrating (follow the platform name link to see how to export them).

Open [Northflank](https://app.northflank.com/login) and login with your username or with GitHub.

<img src="/vendors/northflank/img/Northflank30.png" width="400px" />

</br>

Select `Services ` then your Nightscout project.

<img src="/vendors/northflank/img/Northflank31.png" width="600px" />

</br>

Select `Environment` then `Env`.

<img src="/vendors/northflank/img/Northflank39.png" width="600px" />

</br>

Delete all contents, open your backup file (the .env you generated when doing backup) and copy/paste all in the editor area. Click `Update and restart` bottom right.

<img src="/vendors/northflank/img/Northflank41.png" width="600px" />

</br>
68 changes: 68 additions & 0 deletions docs/troubleshoot/railway.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,71 @@ There is no data inside this database. When you pull down the `Database tab`, th
<img src="/vendors/railway/img/RailwayT11.png" width="600px" />

</br>

## Backup your site variables

Having a copy of your variables is very important since some of them are vital to your site like MONGODB_URI and your access to it like API_SECRET.

a) Open your [Railway](https://railway.app/dashboard) dashboard and select your Nightscout project.

<img src="/vendors/railway/img/RailwayM15.png" width="400px" />

</br>

c) Select your web app and click on `Variables`.

<img src="/vendors/railway/img/RailwayM17.png" width="400px" />

</br>

e) Click on `RAW Editor` top right

<img src="/vendors/railway/img/Railway39.png" width="600px" />

</br>

f) Click on `Copy env` bottom left and paste all into a text editor.

<img src="/vendors/railway/img/Railway40.png" width="400px" />

</br>

```{warning}
Save this file in a safe place.</br>Call it `railway.env` as it's your Railway environment variables.
```

</br>

## Restore your site variables

You can use this method to restore Railway variables (see above how to backup), but also to restore them from [Northflank](/troubleshoot/northflank.md#backup-your-site-variables) or [Heroku](/troubleshoot/heroku.md#method-2-export) if migrating (follow the platform name link to see how to export them).

a) Open your [Railway](https://railway.app/dashboard) dashboard and select your Nightscout project.

<img src="/vendors/railway/img/RailwayM15.png" width="400px" />

</br>

c) Select your web app and click on `Variables`.

<img src="/vendors/railway/img/RailwayM17.png" width="400px" />

</br>

e) Click on `RAW Editor` top right

<img src="/vendors/railway/img/Railway39.png" width="600px" />

</br>

f) Delete all contents, open your backup file (the .env you generated when doing backup) and copy/paste all in the raw editor area. Click `Update variables` bottom right.

<img src="/vendors/railway/img/Railway40.png" width="400px" />

</br>

g) If you see the message `Apply _ changes` top left, click the `Deploy` button and wait for your site to update.

<img src="/vendors/railway/img/RailwayD06.png" width="600px" />

</br>
Binary file added docs/vendors/northflank/img/Northflank41.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2ec07df

Please sign in to comment.