Fix up docker

This commit is contained in:
2025-10-18 02:07:37 -04:00
parent 9c98e65c2d
commit 42d2b88e79
5 changed files with 18 additions and 59 deletions

View File

@@ -1,4 +1,10 @@
# Minimal static web container for Relibre; Caddy runs separately as a reverse proxy.
FROM nginx:alpine 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 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

View File

@@ -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

View File

@@ -1,17 +1,21 @@
version: "3.9"
services: services:
web: web:
build: build:
context: . context: .
dockerfile: Dockerfile.web dockerfile: Dockerfile
expose: ["80"] expose:
- "80"
restart: unless-stopped restart: unless-stopped
proxy: proxy:
image: caddy:alpine image: caddy:alpine
volumes: command: caddy reverse-proxy --from :80 --to web:80
- ./proxy/Caddyfile:/etc/caddy/Caddyfile:ro
ports:
- "8080:80"
depends_on: depends_on:
- web - web
ports:
# change the left side to whatever host port you want
- "8080:80"
restart: unless-stopped restart: unless-stopped

View File

@@ -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

View File

@@ -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