No description
- Shell 51.9%
- Python 47.4%
- Makefile 0.7%
| conf.d | ||
| overlay | ||
| plan | ||
| changelog | ||
| Makefile | ||
| README.md | ||
Mastodon - Federated social networking server
Mastodon <https://github.com/mastodon/mastodon>_ is a self-hosted social networking server built around ActivityPub. This TurnKey appliance scaffold is designed for contributing a new appliance repository to turnkeylinux-apps.
This repository follows the usual TurnKey layout:
Makefilefor product metadata and firewall ports.plan/mainfor extra Debian packages.conf.d/for fully automated build-time installation.overlay/for static files, systemd units, nginx config, inithooks, and backup overrides.
What this scaffold currently does
- creates a dedicated
mastodonsystem user - installs PostgreSQL, Redis, Nginx, Ruby build dependencies, Node toolchain prerequisites, ffmpeg, ImageMagick, and libvips
- clones Mastodon from upstream into
/opt/mastodon/live - installs Ruby with
rbenvand JavaScript dependencies withcorepack/Yarn - seeds a production
.env.productionwith placeholder values during build - runs
db:prepareandassets:precompileduring build - installs Nginx and systemd service templates
- includes a firstboot application hook to set domain/email/password and create the owner account
Important notes
This is a serious starter repository, but it is still a first pass. Before opening a PR upstream, I strongly recommend:
- building it in
tkldevand validating a full non-interactive build - pinning a specific Mastodon tag that is known-good for the target TurnKey release
- validating the exact Ruby/Node versions resolved from upstream on Debian 12/TurnKey 18
- testing firstboot both in ISO and LXC flows
- deciding whether to keep build-time secret generation or move more of it into firstboot
- reviewing whether a Confconsole Let's Encrypt plugin should be added, like GitLab does
Repository layout
::
.
├── .art/
├── conf.d/
├── overlay/
│ ├── etc/nginx/sites-available/mastodon
│ ├── etc/systemd/system/mastodon-*.service
│ ├── usr/lib/inithooks/bin/mastodon.py
│ └── usr/lib/inithooks/firstboot.d/40mastodon
├── Makefile
├── README.rst
├── changelog
└── plan/main
Suggested development flow
::
git clone https://github.com/turnkeylinux-apps/core.git mastodon
# replace with this repository contents
make CHROOT_ONLY=y
fab-chroot build/root.sandbox
# manually validate build assumptions inside the chroot
# then iterate on conf.d and overlay
deck -D build/root.sandbox
make clean
make
Potential next improvements
- add a Confconsole plugin for domain/Let's Encrypt integration
- add a tklweb-cp welcome page with Mastodon service status
- add logrotate overrides if required
- add a safer admin-password set path if
tootctlbehavior changes upstream - add optional object storage/S3 firstboot questions later