- Dockerfile 43.3%
- Shell 36.9%
- Python 19.8%
Makes it easier to enable services, that were previously disabled, as missing databases will be created on startup. Allows us to ship some services (i.e. paste) disabled by default in the future |
||
|---|---|---|
| base | ||
| config | ||
| docs | ||
| services | ||
| .gitignore | ||
| compose.yaml | ||
| LICENSE | ||
| README.md | ||
You probably don't want to use this in production
sourcehut ♥ docker
Unofficial Docker containers for hosting sourcehut.
This project was inspired by ulyc's sourcehut-docker project. But since I was unable to get their init.sh to work, I decided to write my own port.
Also, I wanted my compose.yaml to provide an image for each component
instead of providing one image with preconfigurable components.
🔨 Building
You can manage this project with docker compose,
but because my base image is not on docker-hub,
you'll have to build it yourself.
To do so, simply navigate into the base directory,
and run the following command: 1
sudo docker build . -t sr.ht-base
After the base container has been built,
you can navigate back to the project root
and use sudo docker compose build1
to build all the other containers.
▶ Starting the containers
Before you can start the services you have to configure them. See the Configuration section for more.
As mentioned above,
you can use docker compose to manage the project.
Running the systems is as easy as running1:
sudo docker compose up
(You can also append -d to run them in the background)
👤 Manually creating new users
The meta container has to be running to be able to create an admin account See Starting the containers for more.
To create a new user simply run the following command1:
sudo docker compose exec meta metasrht-manageuser -e <email> <user>
If you'd rather create an admin account, append -t admin:
sudo docker compose exec meta metasrht-manageuser -t admin -e <email> <user>
🪛 Configuration
See the docs/CONFIGURATION.md file for a service by service configuration guide
🪚 Adding/Disabling services
To add or remove services, you can simply remove the given services from the compose.yaml (I recommend commenting out the services instead, because it makes re-adding them later easier).
Keep in mind, that you cannot remove every service, as some services may be required by others (or require additional configuration). It is best to consult the sourcehut documentation before removing services. A couple of good places to start, are the installation guide and the configuration guide.
-
If you have configured docker/podman for non-sudo mode, you may run the command without the sudo. If you are using doas, you might have to replace sudo with doas ↩︎