From 42d2b88e79e692bed26b9465f09e706efd974089 Mon Sep 17 00:00:00 2001 From: James Osborne Date: Sat, 18 Oct 2025 02:07:37 -0400 Subject: [PATCH] Fix up docker --- Dockerfile | 10 ++++++++-- docker-compose.yml.apache | 17 ----------------- ...pose.yml.caddy => docker-compose.yml.example | 16 ++++++++++------ docker-compose.yml.haproxy | 17 ----------------- docker-compose.yml.nginx | 17 ----------------- 5 files changed, 18 insertions(+), 59 deletions(-) delete mode 100644 docker-compose.yml.apache rename docker-compose.yml.caddy => docker-compose.yml.example (50%) delete mode 100644 docker-compose.yml.haproxy delete mode 100644 docker-compose.yml.nginx diff --git a/Dockerfile b/Dockerfile index 0f0db8c..2484427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,10 @@ +# Minimal static web container for Relibre; Caddy runs separately as a reverse proxy. FROM nginx:alpine -COPY proxy/nginx-site.conf /etc/nginx/conf.d/default.conf + +# Serve the repo root (index.html, ui/, images/, etc.) COPY . /usr/share/nginx/html -HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD wget -qO- http://localhost/ > /dev/null || exit 1 + +# Basic healthcheck +HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD \ + wget -qO- http://localhost/ > /dev/null || exit 1 + diff --git a/docker-compose.yml.apache b/docker-compose.yml.apache deleted file mode 100644 index ee83052..0000000 --- a/docker-compose.yml.apache +++ /dev/null @@ -1,17 +0,0 @@ -services: - web: - build: - context: . - dockerfile: Dockerfile.web - expose: ["80"] - restart: unless-stopped - - proxy: - image: httpd:2.4-alpine - volumes: - - ./proxy/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro - ports: - - "8080:80" - depends_on: - - web - restart: unless-stopped diff --git a/docker-compose.yml.caddy b/docker-compose.yml.example similarity index 50% rename from docker-compose.yml.caddy rename to docker-compose.yml.example index 3f067f9..c723e9d 100644 --- a/docker-compose.yml.caddy +++ b/docker-compose.yml.example @@ -1,17 +1,21 @@ +version: "3.9" + services: web: build: context: . - dockerfile: Dockerfile.web - expose: ["80"] + dockerfile: Dockerfile + expose: + - "80" restart: unless-stopped proxy: image: caddy:alpine - volumes: - - ./proxy/Caddyfile:/etc/caddy/Caddyfile:ro - ports: - - "8080:80" + command: caddy reverse-proxy --from :80 --to web:80 depends_on: - web + ports: + # change the left side to whatever host port you want + - "8080:80" restart: unless-stopped + diff --git a/docker-compose.yml.haproxy b/docker-compose.yml.haproxy deleted file mode 100644 index dc4f0c7..0000000 --- a/docker-compose.yml.haproxy +++ /dev/null @@ -1,17 +0,0 @@ -services: - web: - build: - context: . - dockerfile: Dockerfile.web - expose: ["80"] - restart: unless-stopped - - proxy: - image: haproxy:2.9 - volumes: - - ./proxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro - ports: - - "8080:80" - depends_on: - - web - restart: unless-stopped diff --git a/docker-compose.yml.nginx b/docker-compose.yml.nginx deleted file mode 100644 index 448e47a..0000000 --- a/docker-compose.yml.nginx +++ /dev/null @@ -1,17 +0,0 @@ -services: - web: - build: - context: . - dockerfile: Dockerfile.web - expose: ["80"] - restart: unless-stopped - - proxy: - image: nginx:alpine - volumes: - - ./proxy/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro - ports: - - "8080:80" - depends_on: - - web - restart: unless-stopped