Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fly.io example #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Fly.io example #2

wants to merge 4 commits into from

Conversation

colin
Copy link

@colin colin commented Dec 20, 2022

No description provided.


First, let's create a [Fly Postgres](https://fly.io/docs/postgres/) instance. (Example for the smallest instance in Frankfurt, adjust according to your needs.)

flyctl postgres create --name $APP_NAME-postgres --region fra --initial-cluster-size 1 --vm-size shared-cpu-1x --volume-size 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably good to make the region a variable as well :)

Next, we need to generate a `SECRET_KEY` for Takahē and want to set up a few encrypted environment variables for our Takahē installation. (See [Media Configuration](https://docs.jointakahe.org/en/latest/installation/#media-configuration) and [Email Configuration](https://docs.jointakahe.org/en/latest/installation/#email-configuration).)
There's no need to set `TAKAHE_DATABASE_SERVER` as that is already done by Fly in the database attachment step above.

flyctl secrets set -a $APP_NAME TAKAHE_SECRET_KEY=<SECRET KEY>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since no one needs to know the value, this can be something like flyctl secrets set -a $APP_NAME TAKAHE_SECRET_KEY=$(uuidgen) so it auto populates a random value.

kill_timeout = 5

[build]
image = "jointakahe/takahe-dev:edge"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Takahē is still moving pretty quick, might be reasonable to pin this example to the version it was tested against. Otherwise the user will hit weird issues until 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants