diff --git a/compose.yaml b/compose.yaml index 8fe7860..216b395 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,5 +1,5 @@ services: - api-server: + app: image: bryanhonof/iot-api-server-app ports: - "8080:8080" @@ -18,8 +18,25 @@ services: - db:/var/lib/iot-api-server networks: - backend + caddy: + image: caddy + restart: unless-stopped + cap_add: + - NET_ADMIN + ports: + - "80:80" + - "443:443" + - "443:443/udp" + volumes: + - $PWD/Caddyfile:/etc/caddy/Caddyfile + - $PWD/site:/srv + - caddy_data:/data + - caddy_config:/config volumes: grafana-storage: {} db: {} + caddy_data: + external: true + caddy_config: networks: backend: \ No newline at end of file diff --git a/webserver/Caddyfile b/webserver/Caddyfile new file mode 100644 index 0000000..99207d7 --- /dev/null +++ b/webserver/Caddyfile @@ -0,0 +1,4 @@ +https://iot.pxl.bjth.xyz { + encode zstd gzip + reverse_proxy /api/* app:8080 +}