diff --git a/wiki/docker-images/bilde2910_-_hauk.md b/wiki/docker-images/bilde2910_-_hauk.md new file mode 100644 index 0000000..ff08a08 --- /dev/null +++ b/wiki/docker-images/bilde2910_-_hauk.md @@ -0,0 +1,64 @@ +# bilde2910 - Hauk + +This is a docker container for a [Hauk](../hauk.md). + +## Set-up + +Create the files `rebuild.sh` and `docker-compose.yml` at the same place. +Additionally create a `config.php` file based on the +[config-sample](https://github.com/bilde2910/Hauk/blob/master/backend-php/include/config-sample.php) +at the location specified in your `docker-compose.yml` (in this example it's +`./config/hauk`). +Change the config according to your needs. +Do not change anything starting with `memcached` inside the `config.php`. +Most importantly set the `public_url` correctly. +For a simple multi-user setup set `auth_method` to `HTPASSWD`. +Then inside the same folder of `config.php` run the following command to setup +the first and optionally more users. + +```sh +htpasswd -cBC 10 /etc/hauk/users.htpasswd +htpasswd -BC 10 /etc/hauk/users.htpasswd +``` + +Finally run `./rebuild.sh`. + +## Volumes + +Set the following volumes in the `volumes:` section of the docker-compose file. + +| Outside mount/volume name | Container mount | Description | +| ------------------------- | ------------------ | ------------------------------ | +| `./config/hauk` | `/etc/hauk` | config and password location | + +## Ports + +Set the following ports in the `ports:` section. + +| Container Port | Recommended outside port | Protocol | Description | +| -------------- | ------------------------ | -------- | ---------------------- | +| `80` | `80` | TCP | Basic service | + +## rebuild.sh + +```sh +#!/bin/sh +docker-compose down +docker pull bilde2910/hauk +docker-compose up -d +``` + +## docker-compose.yml + +```yml +version: "2" + +services: + hauk: + image: bilde2910/hauk + restart: unless-stopped + volumes: + - ./config/hauk:/etc/hauk + ports: + - "80:80" +``` diff --git a/wiki/docker-images/mailserver_-_docker-mailserver.md b/wiki/docker-images/mailserver_-_docker-mailserver.md index 9d27440..6f02c67 100644 --- a/wiki/docker-images/mailserver_-_docker-mailserver.md +++ b/wiki/docker-images/mailserver_-_docker-mailserver.md @@ -31,6 +31,10 @@ And finally generate the DCIM keys and rebuild once again. `./setup.sh config dkim` +Finally if a reverse proxy is used check the +[traefik entry](/wiki/docker-images/traefik.md#setup-mailserver) or the +[nginx entry](./nginx.md). + Afterwards you're ready to go by once again running the `rebuild.sh` file. ## rebuild.sh diff --git a/wiki/docker-images/traefik.md b/wiki/docker-images/traefik.md index ec78eb1..fbfcb3d 100644 --- a/wiki/docker-images/traefik.md +++ b/wiki/docker-images/traefik.md @@ -184,6 +184,7 @@ To create a reverse proxy from a docker container add the following lines in the ```yml - "traefik.enable=true" + - "traefik.docker.network=proxy" - "traefik.http.routers.-secure.entrypoints=websecure" - "traefik.http.routers.-secure.rule=Host(`.`)" - "traefik.http.routers.-secure.service=" @@ -191,3 +192,23 @@ To create a reverse proxy from a docker container add the following lines in the ``` This configuration automatically redirects http to https. +When using this configuration the port specified in the latter lines can be +ommitted in the `ports:` section if not used directly. +This ensures access only via https and restricts access via ip and port. + +## Setup Mailserver + +If setting up a +[docker-mailserver by mailserver](./mailserver_-_docker-mailserver.md) no http +or https is needed. +But a certificate for the mailserver is needed regardless. +In this case add the following lines to the file `docker-compose.yml` in the +`services:` section and adapt them. + +```yml + whoami: + image: docker.io/traefik/whoami:latest + labels: + - "traefik.enable=true" + - "traefik.http.routers.whoami.rule=Host(`.`)" +``` diff --git a/wiki/hauk.md b/wiki/hauk.md new file mode 100644 index 0000000..7d79932 --- /dev/null +++ b/wiki/hauk.md @@ -0,0 +1,11 @@ +# Hauk + +Hauk is a selfhostable location sharing server that can be used with the Hauk +app that is available at +[F-Droid](https://f-droid.org/packages/info.varden.hauk/) and +[Google Play Store](https://play.google.com/store/apps/details?id=info.varden.hauk). + +## Setup + +The server can be setup via docker with the +[bilde2910 image](/wiki/docker-images/bilde2910_-_hauk.md).