**WIP** docker build configuration files to run the Treebird FCGI from a container
Find a file
2022-05-28 18:53:08 -04:00
mastodont-c@f16c12e04f Add build setup script and make mastodont-c a submodule as well so it can be cloned outside the container 2022-05-20 23:46:54 -04:00
treebird@7b41f083f1 Add the actual treebird git as a submodule 2022-05-20 22:26:11 -04:00
.gitmodules Update submodules to point to my mirror of neko's fossil repos since he no longer maintains his git 2022-05-28 18:53:08 -04:00
build_container.sh fix path to dist folder in build 2022-05-21 21:00:44 -04:00
configure_build.sh get rid of a sometimes unsupported shell feature from configure_build.sh 2022-05-22 09:03:13 -04:00
Dockerfile allow FCGI to be connected to with -p port:port instead of using --network host set 2022-05-22 09:27:34 -04:00
README.md misc info to readme 2022-05-28 18:53:08 -04:00
TODO todo 2022-05-21 20:33:37 -04:00

Containerized Treebird FE Build

This git repo contains the files needed to builder a docker containerized setup of nekobit's C FCGI based Treebird Front End for Pleroma or other Mastodon compatibles.

How to build the container image

The build is divided into two parts to allow you to make custom configuration changes. Run the following to prepare the container build configuration.

./configure_build.sh instance_domain treebird_domain [treebird_fcgi_port (optional)]

options:

  • instance_domain: domain of the instance for Treebird FE to connect to (ex: sleepy.cafe)
  • treebird_domain: domain you plan serve Treebird on (ex: treebird.mysite.com)
  • treebird_fcgi_port: internal FCGI port for your http server to communicate with Treebird DO NOT set this unless you have a port conflict (default: 4008)

The script will generate a folder named configs/ containing configuration files you can edit further as needed before starting the build. Once ready, run the following:

./build_container.sh [image_name (optional)] [container_name (optional)]

NOTE: Unless your user is a member of the docker group, you will need root for this!

The build should complete without errors and if you run docker image ls you should see treebird:latest (or whatever alt image tag you set in the previous command).

Troubleshooting

Various issues I have seen and solutions

Random Issue I Saw - I

On older versions of debian you need to install docker.io to get docker (the container software) rather than docker (some utility for docking widgets in GUIs I think).

Random Issue I Saw - II

If the container build fails and you get the following message:

The key(s) in the keyring /etc/apt/trusted.gpg.d/debian-archive-bullseye-automatic.gpg are ignored as the file is not readable by user '_apt' executing

Try building the container locally or on another system. I saw this when running from debian stable VPS. I think it is some kind of permission issue due to kernel or docker version differences because the exact same image runs fine on other host distros.

After building elsewhere you can do the following:

docker save treebird:latest -o treebird.dsave
rsync -avP treebird.dsave name@myserver:~/
ssh name@myserver
docker load -i treebird.dsave

Random Issue I Saw - III

In the nginx config it handles more than one set of a fastcgi_param very poorly so if you include fastcgi.conf and try to set SCRIPTNAME after, it will fail to update it and you will get the usual fastcgi cryptic error.