Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker examples #79

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion gomuks/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,42 @@ Simply pull changes (`git pull`) and run `./build.sh` again to update.

## Docker (gomuks web)
The backend for gomuks web can also run in Docker. Docker images are available
at `dock.mau.dev/tulir/gomuks`.
at [dock.mau.dev/tulir/gomuks](https://mau.dev/tulir/gomuks/container_registry/111?sort=desc).

Keep in mind that the backend has all your encryption keys, which means it must
be ran in a secure location.

This example mirrors the port and locations used when running the binary directly:
```yaml:docker-compose.yml
services:
gomuks:
image: dock.mau.dev/tulir/gomuks:latest
restart: unless-stopped
ports:
- "29325:29325"
volumes:
- "$HOME/gomuks:/data"
```

On the first run, launch interactively to generate the config files:
```bash
docker compose run -it gomuks
```

Or use Docker Run:
```bash
docker run -it --rm \
-p 29325:29325 \
-v $HOME/gomuks:/data \
dock.mau.dev/tulir/gomuks:latest
```

Once configured, remove the `-it` and use `-d` to have gomuks daemonize, then
access the web interface at `http://localhost:29325`.

If you are running gomuks on a different machine, or through a reverse proxy,
you may need to edit the listen address in the generated `config.yaml`, e.g.
```yaml:config/config.yaml
web:
listen_address: 0.0.0.0:29325
```