diff --git a/Makefile b/Makefile index 98458cf..db723fb 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,6 @@ build: run: -docker rm -f mastodon docker run --env WEB_DOMAIN="test123.example.com" --hostname mastodon --name mastodon -ti $(NAME) + +deploy: + caprover deploy -a mastodon --default diff --git a/README.md b/README.md index 79bf8b4..6f631ae 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,21 @@ Don't ever host things anywhere but on a domain that you own. This violates all the docker best practices and puts the whole-ass app inside a single container (including redis and postgres!) so that you can -easily bring up a sef-hosted mastodon on things like caprover in a single -"app" without having to worry about cross-container links. +easily bring up a self-hosted mastodon on things like caprover self-hosted +PaaS in a single "app" without having to worry about multiple containers or +configuring cross-container links. This is scratching an itch: I really just wanted a one-command single-user -Mastodon instance. +Mastodon instance that stores all of its state in a single directory I can +tar and scp. # Features * Ubuntu bionic -* Everything in one container, including a very minimal postfix, postgres, +* Everything in one container, including minimal postfix, postgres, and redis -* assets are precompiled on startup -* all state is in one volume +* assets are precompiled on server startup +* all state is in one volume/dir * database migrations can be run at startup # Build Variables @@ -47,8 +49,8 @@ here for all processes without restarting the docker container. # Ports -* 3000: mastodon web (no tls, do that elsewhere) -* 4000: mastodon streaming +* `3000`: mastodon web (no tls, do that elsewhere) +* `4000`: mastodon streaming # Credits @@ -90,3 +92,6 @@ mastodon@c81a376bf546:~$ cd app mastodon@c81a376bf546:~/app$ RAILS_ENV=production envdir /state/envdir bin/tootctl accounts create --email --confirmed --role admin ``` +If `WEB_DOMAIN` != `LOCAL_DOMAIN` make sure you have both set in your +shell's environment (or in the envdir) before running tootctl to add your +user.