servnest-containers/README.md

1.9 KiB

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
./reset.sh # (re)initialize data
./upstream.sh # download and verify upstream software

Build

podman-compose -f compose.yaml -f base.yaml build alpine php # build base images
podman-compose build # build every other service images

Run

Optionally, to enable the knot-secondary service:

# uncomment "notify:" lines in knot.conf, then:
podman-compose --profile=secondary up knot knot-secondary # generate QUIC keys
./setup-xoq.sh # setup mutual XFR over QUIC
podman-compose up # start containers
podman-compose exec core sh -c 'php$PHP_VERSION /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)
docker rm $(docker ps -qa)
docker image rm -f $(docker image list -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.