Skip to content

Instantly share code, notes, and snippets.

@tho
Last active April 13, 2024 20:01
Show Gist options
  • Save tho/bc7a8d8b5b3dd5e4803b0c78d5a5407c to your computer and use it in GitHub Desktop.
Save tho/bc7a8d8b5b3dd5e4803b0c78d5a5407c to your computer and use it in GitHub Desktop.
Deploy Miniflux on Fly.io

Deploy Miniflux on Fly.io

Miniflux is a minimalist and opinionated feed reader.

Prerequisites

Miniflux on Fly.io

Install

TL;DR

flyctl launch --copy-config --no-deploy --image "ghcr.io/miniflux/miniflux:X.Y.Z-distroless"
flyctl postgres create --name "$APP_NAME-db" --vm-size shared-cpu-1x --initial-cluster-size 1 --volume-size 1
flyctl postgres attach "$APP_NAME-db" --database-name miniflux2 --database-user miniflux
flyctl deploy
flyctl ssh console --command "miniflux -create-admin"
flyctl open

Details

  1. Create a new app based off of the template fly.toml file (part of this gist).

    flyctl launch --copy-config --no-deploy --image "ghcr.io/miniflux/miniflux:X.Y.Z-distroless"
  2. Store the app name in an environment variable for easy reference.

    APP_NAME="<APP_NAME>"

    If you chose to use an auto-generated name, see the output of flyctl launch or fly.toml for the app name.

  3. Create a postgres cluster (Development - Single node, 1x shared CPU, 256MB RAM, 1GB disk).

    flyctl postgres create --name "$APP_NAME-db" --vm-size shared-cpu-1x --initial-cluster-size 1 --volume-size 1
  4. Attach the postgrges cluster to the app.

    flyctl postgres attach "$APP_NAME-db" --database-name miniflux2 --database-user miniflux
  5. Deploy the app.

    flyctl deploy
  6. Create an admin user.

    flyctl ssh console --command "miniflux -create-admin"
  7. Open https://APP_NAME.fly.dev in your browser.

    Alternatively, run flyctl open.

  8. Log in as admin and create regular user(s).

    Settings > Users > Add user

kill_signal = "SIGTERM"
kill_timeout = 300
[build]
image = "ghcr.io/miniflux/miniflux:X.Y.Z-distroless"
[deploy]
release_command = "/usr/bin/miniflux -migrate"
[env]
FETCH_YOUTUBE_WATCH_TIME = "1"
HTTPS = "1"
MEDIA_PROXY_MODE = "all"
MEDIA_PROXY_RESOURCE_TYPES = "audio,image,video"
WEBAUTHN= "1"
[[services]]
internal_port = 8080
protocol = "tcp"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
handlers = ["http"]
port = 80
force_https = true
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.http_checks]]
grace_period = "5s"
interval = 10000
method = "get"
path = "/healthcheck"
protocol = "http"
timeout = 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment