diff --git a/src/day_3/tasks.md b/src/day_3/tasks.md index ad9b900..1ec180f 100644 --- a/src/day_3/tasks.md +++ b/src/day_3/tasks.md @@ -122,10 +122,36 @@ You can find more information about the Nextcloud container here: https://hub.do Create a directory called `nextcloudN` in the home directory of the user `admin`. `N` at the end stands for the number that you are using in the url to connect to the browser terminal `ttydN.mo8it.xyz`. -Create a container with the following options: +Create a directory called `nextcloudN-db` for the database container. Replace `N` as above! -- Container name: nextcloudN. `N` at the end stands for the number that you are using in the url to connect to the browser terminal `ttydN.mo8it.xyz`. -- Timezone: local -- Network: traefik +Create a container for the database with the following options: + +- Container name: `nextcloudN-db`. Replace `N` as above! +- Timezone: `local` +- Network: `traefik` +- Volume: Mount the directory `nextcloudN-db` that you did create into `/var/lib/postgresql/data` in the container. Use the label `Z`! +- The following environment variables: + - `POSTGRES_DB=nextcloud` + - `POSTGRES_USER=nextcloud` + - `POSTGRES_PASSWORD=DB_PASSWORD`. Replace `DB_PASSWORD` with a good password! +- Label: `io.containers.autoupdate=registry` +- Image: docker.io/library/postgres:alpine + +Create the actual Nextcloud container with the following options: + +- Container name: `nextcloudN`. `N` at the end stands for the number that you are using in the url to connect to the browser terminal `ttydN.mo8it.xyz`. +- Timezone: `local` +- Network: `traefik` - Volume: Mount the directory `nextcloudN` that you did create into `/var/www/html` in the container. Use the label `Z`! -- ... (I will continue the task description during the lunch break) +- The same environment variables as for the other container! Use the same `DB_PASSWORD`. Add one more environment variable: + - `POSTGRES_HOST=nextcloudN-db`. Replace `N` as above! +- Label: `io.containers.autoupdate=registry` +- Image: docker.io/library/nextcloud:24-apache + +Create the systemd files for the two containers above. + +Move the systemd files to `~/.config/systemd/user`. + +Enable and start the two containers as user services with `systemctl --user enable --now container-nextcloudN-db` and `systemctl --user enable --now container-nextcloudN`. Replace the `N` as above! + +Visit [https://nextcloudN.jinext.xyz](https://nextcloudN.jinext.xyz) to see if everything did work! Replace the `N` as above!