Skip to content

Commit

Permalink
caddy: switch to local image
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed May 10, 2024
1 parent df320ac commit 17852c2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ name: testbed
services:
master:
image: ghcr.io/ucla-irl/testbed-master:latest
restart: unless-stopped
init: true
tty: true
dns: # prevent resolving to 127.0.0.1
Expand All @@ -21,13 +20,13 @@ services:
entrypoint: /bin/bash
command: [scripts/master.sh]
working_dir: /testbed
restart: unless-stopped
healthcheck:
test: [CMD, stat, /testbed/dist/.master-ready]
interval: 3s

caddy:
image: caddy:2
restart: unless-stopped
image: ghcr.io/ucla-irl/testbed-caddy:latest
cap_add:
- NET_ADMIN
ports:
Expand All @@ -38,6 +37,7 @@ services:
- ${PWD}/dist/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ${PWD}/dist/caddy/data:/data
- ${PWD}/dist/caddy/config:/config
restart: unless-stopped
depends_on:
master: { condition: service_healthy }

Expand Down
11 changes: 10 additions & 1 deletion templates/caddy/Caddyfile.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{{ ansible_host }}

reverse_proxy http://nfd-http-status-server:8080
@nfdstatus {
path /
path /nfd-status.xsl
path /*.css
}

reverse_proxy @nfdstatus http://nfd-http-status-server:8080
reverse_proxy /ws* http://nfd:9696

root * /srv
file_server

{% if is_root_ca is defined %}
handle_path /root-ca* {
reverse_proxy http://root-http-ca:8777
Expand Down

0 comments on commit 17852c2

Please sign in to comment.