ServNest containers and compose files, for use with Podman/Docker
Find a file
Miraty 50a52ca68f add compatibility with rootless docker
notably /tmp is not automatically writable inside a read-only container, contrarily to podman
2024-10-14 22:02:31 +02:00
conf run tor as root 2024-08-08 00:03:43 +02:00
core@d9ff87a833 rename root directories 2024-07-26 01:43:56 +02:00
data add default zone files for registry 2024-08-08 02:51:15 +02:00
logs add .gitkeep for more required directories 2024-09-22 18:33:09 +02:00
sock add .gitkeep for more required directories 2024-09-22 18:33:09 +02:00
tmp add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
.env move container/ tree at root, del mkosi, add certbot 2024-07-23 00:27:43 +02:00
.gitignore add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
alpine.Containerfile run tor as root 2024-08-08 00:03:43 +02:00
apache.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
base.yaml add alpine as base image + add cronie service 2024-07-24 18:30:48 +02:00
compose.yaml add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
cronie.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
knot.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
LICENSE.md Set CNPLv7+ as license 2022-08-29 21:01:16 +02:00
nginx.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
php.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
README.md add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
sftpgo.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00
sha256sums various minor fixes 2024-08-08 00:11:05 +02:00
tor.Containerfile add compatibility with rootless docker 2024-10-14 22:02:31 +02:00

ServNest setup with Compose

Use with Podman

Preparation

Set the following in ~/.config/containers/containers.conf (or /etc/containers/containers.conf):

[containers]
no_hosts=true
knotc --confdb data/knot/confdb conf-import conf/knot.conf
cp data/reg/servnest.test.zone.default data/reg/servnest.test.zone
cp data/reg/test.servnest.test.zone.default data/reg/test.servnest.test.zone
chmod u=rwX,g=rX,o=rX -R conf core
chmod u=rwX,g=rwX,o=rwX logs/sftpgo logs/php sock/php logs/apache logs/nginx sock/tor-client sock/nginx-onion sock/knot data/knot data/knot/confdb data/knot/confdb/*.mdb tmp/nginx tmp/certbot tmp/acme tmp/apache tmp/nginx-run tmp/php data/reg data/reg/*.zone core/db core/db/servnest.db
chmod u=rwX,g=rX,o= sock/tor-control
wget https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86_64/alpine-minirootfs-3.20.2-x86_64.tar.gz
wget https://github.com/drakkan/sftpgo/archive/refs/tags/v2.6.2.tar.gz -O sftpgo-v2.6.2.tar.gz
sha256sum -c sha256sums

Build

podman-compose -f base.yaml build alpine # build base image
podman-compose build # build services images

Run

podman-compose up # start containers
podman-compose exec php php /srv/servnest/core/jobs/check.php # test main features

When running up, the only expected error messages are:

[sftpgo] | WRN provider initialized but data loading failed: stat sftpgo.db: no such file or directory [tor] | [warn] You are running Tor as root. You don't need to, and you probably shouldn't.

Podman Compose 1.2.0 randomly fails to start some services (see issue 921). The workaround is to retry multiple times.

Reset

podman container rm --all
podman image rm --all
podman rm $(podman container list --external -q)

Use with rootless Docker

export DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock

Then use the instructions for Podman but replace podman with docker in command names.

License

This project is published under the Cooperative Nonviolent Public License No Attributions, version 7 or any later version (CNPL-NAv7+), as found in LICENSE.md or at https://git.pixie.town/thufie/npl-builder.