Deploy to Fly.io
You can deploy PenX to Fly.io.
If you don’t have a URL yet, refer to this guide to get a PostgreSQL database.
Configure your Fly app
Save the following snippet into a file named fly.toml
somewhere on your computer, changing the app name as you see fit:
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
app = "penx" # you can use your app name
primary_region = "atl"
[build]
image = "penxio/penx:latest"
[env]
DATABASE_URL = "postgresql://..."
[http_service]
internal_port = 3000
force_https = true
[[http_service.checks]]
interval = "10s"
timeout = "1s"
grace_period = "20s"
method = "GET"
path = "/"
[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 1024
Deploy!
in your terminal, navigate to the directory where fly.toml is located and run fly launch --copy-config
:
fly launch --copy-config
Real world example
When deployed successfully, you should get a URL like:
Upgrade
If new version PenX is released, you can upgrade it easily by flyctl deploy
:
flyctl deploy