Linkding on, django, sqlite

Yet another container running on, this time a Django application.

Shortly after writing this up, I discovered the excellent repository fspoettel/linkding-on-fly which does a better job than below, including setting up litestream backups. :-)

This was very straight forward to setup. First, launch an application and create a volume:

# I'm using region ARN for below
$ flyctl launch --vm-size shared-cpu-1x -r arn --name linkding-example
$ flyctl volumes create linkding_example_data -s 1 -r arn -a linkding-example

Then, edit your fly.toml into something like this:

app = "linkding-example"
primary_region = "arn"

  image = "sissbruecker/linkding:latest"

  source = "linkding_example_data"
  destination = "/etc/linkding/data"

  # Container exposes 9090
  internal_port = 9090
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ["app"]

  cpu_kind = "shared"
  cpus = 1
  memory_mb = 256

Then, finally create a superuser using the Django tooling:

$ /opt/venv/bin/python createsuperuser --username=joe

I’ve created two users, one superuser, and one normal user. I use the latter as my ’end user'.