Start converting some enum-like strings to proper enums, plus global reformat

This commit is contained in:
Ian Renton
2026-09-02 08:37:13 +01:00
parent 5a6fc19ab5
commit 606cf1be68
24 changed files with 81 additions and 79 deletions
+12 -11
View File
@@ -23,15 +23,16 @@ You can replace `#main` with any other branch or tag reference, for example `#1.
Save the file. You will still need to create a copy of `config-example.yml` and name it `config.yml`, though with the
Docker setup nothing has actually been downloaded yet, so you will have to copy the example from the repository some
other way, e.g. [from the repo in a web browser](https://git.ianrenton.com/ian/spothole/src/branch/main/config-example.yml).
other way,
e.g. [from the repo in a web browser](https://git.ianrenton.com/ian/spothole/src/branch/main/config-example.yml).
With that in place, run `docker compose up` and you should be good to go. To detach, press `d` or run the command with
the `-d` flag.
### nginx Reverse Proxy with Docker
In a containerised setup, it's typical to run an nginx reverse proxy in one container, alongside certbot for renewal
of HTTPS certificates, and then applications like Spothole in a separate container. In this case, there are a couple of
In a containerised setup, it's typical to run an nginx reverse proxy in one container, alongside certbot for renewal of
HTTPS certificates, and then applications like Spothole in a separate container. In this case, there are a couple of
variations of the docker compose file above, and the nginx reverse proxy configuration covered [here](./nginx.md), that
you will want to make.
@@ -60,8 +61,8 @@ networks:
```
In your nginx site configuration, you'll want to refer to the Spothole container directly, and drop the block that
allows nginx to access static files directly, as these will be inaccessible in another container. So you may end up
with something like:
allows nginx to access static files directly, as these will be inaccessible in another container. So you may end up with
something like:
```nginx
server {
@@ -146,13 +147,13 @@ server {
```
If desired, you could even change the port on which Spothole runs from 8080 to a plain 80, in which case your
`proxy_pass` statements could drop the `:8080` suffix. Since Spothole is in a container, it can serve HTTP on port 80
if desired, because it doesn't conflict with the host system.
`proxy_pass` statements could drop the `:8080` suffix. Since Spothole is in a container, it can serve HTTP on port 80 if
desired, because it doesn't conflict with the host system.
### Restoring the static files bypass
If you would still like to bypass Spothole's web server for the static files, and serve them with nginx, you can
do. The easiest way is to run another nginx container to serve the files, so your Spothole `compose.yaml` becomes:
If you would still like to bypass Spothole's web server for the static files, and serve them with nginx, you can do. The
easiest way is to run another nginx container to serve the files, so your Spothole `compose.yaml` becomes:
```yaml
services:
@@ -183,8 +184,8 @@ networks:
external: true
```
Then you can re-add the block that handles the `/static` path in your nginx reverse proxy config, but this time
point it at the new container rather than at a filesystem path:
Then you can re-add the block that handles the `/static` path in your nginx reverse proxy config, but this time point it
at the new container rather than at a filesystem path:
```nginx
# Load static assets from the spothole-static-nginx container