TypeScript reverse proxy and static server with automatic HTTPS and simple environment configuration
293
TypeScript/Node.js reverse proxy and static server configured through environment variables. Mounted static sites, HTTP backends, automatic HTTPS, optional certificate volume, no Docker socket. Own code is Apache-2.0; bundled components keep their licenses.
services:
certlivo:
image: oliverweinrich/certlivo:1.0.2
restart: unless-stopped
ports:
- '80:80'
- '443:443'
environment:
ACME_EMAIL: [email protected]
ACME_AGREE_TOS: 'true'
ROUTES_JSON: |-
[
{"host":"example.com","path":"/","target":"file:///sites/website","tls":true},
{"host":"example.com","path":"/api","target":"http://api:3000","tls":true},
{"host":"legacy.example.com","path":"/","target":"http://website:80","tls":false}
]
volumes:
- ./website:/sites/website:ro
# Optional: retain accounts and certificates when the container is replaced.
# Add to volumes above: certificates:/data
website:
image: nginx:1.31.7-alpine
restart: unless-stopped
# Alternatively serve another site through a separate HTTP container.
# volumes:
# - ./website:/usr/share/nginx/html:ro
api:
image: ${API_IMAGE:?Set the image of your API listening on port 3000}
restart: unless-stopped
# volumes:
# certificates:
services:
certlivo:
image: oliverweinrich/certlivo:1.0.2
restart: unless-stopped
ports:
- '80:80'
- '443:443'
environment:
ACME_EMAIL: [email protected]
ACME_AGREE_TOS: 'true'
MAX_BODY_SIZE: '10m'
ROUTES_JSON: |-
[
{"host":"api.example.com","path":"/","target":"http://api:3000","tls":true}
]
api:
image: ${API_IMAGE:?Set the image of your API listening on port 3000}
restart: unless-stopped
Set your domains, email and API image. Backend ports stay internal. Certlivo uses 80/443. Without optional /data persistence, container replacement reissues keys and certificates and can hit CA rate limits. Use a volume for stable upgrades.
Sources and third-party licenses for oliverweinrich/certlivo:1.0.2 and the matching oliverweinrich/certlivo:1.0.2-sources image are distributed with the GitHub release. Read noticesโ and configurationโ before deployment.
Content type
Image
Digest
sha256:dabb37e7aโฆ
Size
230.7 MB
Last updated
1 day ago
docker pull oliverweinrich/certlivo