readme: more information

This commit is contained in:
Miraty 2024-09-22 18:38:33 +02:00
parent 72f793c5dd
commit 4c24e5720b

View file

@ -1,4 +1,8 @@
# podman-compose setup
## Use
### Preparation
Set the following in `~/.config/containers/containers.conf` (or `/etc/containers/containers.conf`):
```toml
@ -7,11 +11,41 @@ no_hosts=true
```
```shell
knotc --confdb knot-varlib/confdb conf-import install/knot.conf
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 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
wget https://github.com/drakkan/sftpgo/archive/refs/tags/v2.6.2.tar.gz -O sftpgo-v2.6.2.tar.gz
sha256sum -c sha256sums
podman-compose -f base.yaml build alpine
podman-compose up --build
podman-compose exec php php /srv/servnest/core/jobs/check.php
```
### Build
```shell
podman-compose -f base.yaml build alpine # build base image
podman-compose build # build services images
```
### Run
```shell
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](https://github.com/containers/podman-compose/issues/921)). The workaround is to retry multiple times.
### Reset
```shell
podman container rm --all
podman image rm --all
podman rm $(podman container list --external -q)
```