From 579e385dce9d130815824efdcc93402d084ffc50 Mon Sep 17 00:00:00 2001 From: hoostine Date: Fri, 3 May 2024 01:42:31 -0500 Subject: [PATCH] initial commit --- Caddyfile | 4 ++++ docker-compose.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ site/index.html | 4 ++++ 3 files changed, 51 insertions(+) create mode 100644 Caddyfile create mode 100644 docker-compose.yml create mode 100644 site/index.html diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..5520508 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,4 @@ +:3001 { + bind 10.0.20.253 + reverse_proxy 10.0.20.3:8989 +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..738be0b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,43 @@ +services: + caddy: + build: + context: . + dockerfile_inline: | + FROM caddy:2.7.6-builder AS builder + + RUN xcaddy build \ + --with github.com/caddy-dns/route53@v1.3.3 \ + --with github.com/lucaslorentz/caddy-docker-proxy/v2@v2.8.11 + + FROM caddy:2.7.6 + + COPY --from=builder /usr/bin/caddy /usr/bin/caddy + + restart: unless-stopped + environment: + - AWS_ACCESS_KEY_ID=AKIA... + - AWS_SECRET_ACCESS_KEY=asdf... + networks: + - caddy + - caddy-ext + ports: + - "10.0.20.253::3001" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + - ./site:/srv + - caddy_data:/data + - caddy_config:/config + +networks: + caddy: + caddy-ext: + driver: ipvlan + ipam: + config: + - subnet: 10.0.20.0/24 + gateway: 10.0.20.1 + ip_range: 10.0.20.253/32 + +volumes: + caddy_data: + caddy_config: \ No newline at end of file diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..6365847 --- /dev/null +++ b/site/index.html @@ -0,0 +1,4 @@ + + Success! +

It seems to work.

+ \ No newline at end of file