Skip to content

Commit

Permalink
feat: enable caddy for reverse proxying
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanhonof committed Dec 18, 2023
1 parent 90a2128 commit 705dbd0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 18 additions & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
api-server:
app:
image: bryanhonof/iot-api-server-app
ports:
- "8080:8080"
Expand All @@ -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:
4 changes: 4 additions & 0 deletions webserver/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
https://iot.pxl.bjth.xyz {
encode zstd gzip
reverse_proxy /api/* app:8080
}

0 comments on commit 705dbd0

Please sign in to comment.