1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

readme tweaks and example user service

This commit is contained in:
Robin Appelman 2026-02-24 20:38:04 +01:00
commit 4f6b1fbd9b
2 changed files with 35 additions and 25 deletions

View file

@ -93,7 +93,7 @@ Additionally, you can use the following options when starting an instance:
- `oc`: start an ownCloud instance in the same network.
- `imaginary`: start an Imaginary service and configure it for preview
generation.
- `mail`: start an [smtp4dev](https://github.com/rnwood/smtp4dev) server and
- `mail`: start a [smtp4dev](https://github.com/rnwood/smtp4dev) server and
configure it the mail server.
- `redis`: start a separate container for redis.
- `redis-tls`: connect to redis over TLS.
@ -105,7 +105,7 @@ Additionally, you can use the following options when starting an instance:
haze test [database] [php-version] [path]
```
Where `path` is a file or folder to run phpunit in, relative to the sources
Where `path` is a file or folder to run PHPUnit in, relative to the sources
root.
### List running instances
@ -129,7 +129,7 @@ haze clean
## Controlling running instances
The following commands run against the most recently started instance and allow
optionally providing a `match` to select a specific instance by it's name.
optionally providing a `match` to select a specific instance by its name.
#### Open an instance
@ -206,7 +206,7 @@ haze [match] env <cmd> [args]
Runs the provided command with `NEXTCLOUD_URL`, `DATABASE_URL` and `REDIS_URL`
environment variables set for the matched instance.
This is intented to run a local
This is intended to run a local
[push daemon](https://github.com/nextcloud/notify_push) against an instance.
#### Update the container images
@ -260,13 +260,13 @@ instances.
## Proxy
By default, instances can be accessed by their IP. In order to get more
memorable urls and allow supporting https, haze comes with a builtin reverse
memorable URLs and allow supporting https, haze comes with a builtin reverse
proxy to allow using a wildcard domain.
### Requirements
- A domain name you can set wildcard DNS records for
- A reverse proxy like nginx or apache
- A reverse proxy like nginx or Apache
- (optionally) a wildcard ssl certificate (can be acquiring using letsencrypt
and dns verification)
@ -274,9 +274,9 @@ proxy to allow using a wildcard domain.
- Set a DNS record for `*.haze.exmaple.com` and `haze.example.com` pointing to
`127.0.0.1` or your development machine if you need to access it from other devices.
- Set the `proxy` configuration with your domain and desired listen endpoint
- Set the `proxy` configuration with your domain and desired listen endpoint.
- Set up a service to run `haze proxy` in the background as your own user. A
systemd user service is recommended.
systemd user service is recommended (see [haze.service](./haze.service) for an example).
- Configure your reverse proxy of choice to proxy `*.haze.example.com` and
`haze.example.com` to the proxy's listen endpoint
- (optional) acquire a wildcard ssl certificate for your domain and set your
@ -286,7 +286,7 @@ proxy to allow using a wildcard domain.
### Usage
When the proxy is configured, generated urls for the instances will use a
When the proxy is configured, generated URLs for the instances will use a
subdomain of the configured domain, e.g. the `rolling-bees` instance will be
available at `rolling-bees.haze.example.com`. Additionally, `haze.example.com`
will automatically point to the last created instance.
@ -322,7 +322,7 @@ read_only = true
[proxy] # optional
address = "haze.example.com" # base domain
https = true # Is the proxy behind an https terminating proxy
https = true # Is the proxy behind a https terminating proxy
listen = "/run/haze/haze.sock" # either a unix socket path
#listen = "127.0.0.1:8080" # or a socket address

10
haze.service Normal file
View file

@ -0,0 +1,10 @@
[Install]
WantedBy=default.target
[Service]
ExecStart=/usr/bin/haze proxy
Restart=on-failure
RestartSec=10
[Unit]
Description=Haze reverse proxy