Standalone maintenance server, serving a static "maintenance page" with a default message that the site is under maintenance.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
James Mills 82ee27cfce
Add support for logging the request host (virtual hosts)
1 month ago
.chglog Hard Fork 1 month ago
.dockerfiles Hard Fork 1 month ago
static Hard fork 1 month ago
tools Hard Fork 1 month ago
.drone.yml Hard Fork 1 month ago
.editorconfig added simple draft 4 years ago
.gitignore Hard Fork 1 month ago
.goreleaser.yml Hard Fork 1 month ago
CHANGELOG.md Update CHANGELOG for 1.1.1 1 month ago
Dockerfile Hard Fork 1 month ago
LICENSE Hard Fork 1 month ago
LICENSE.old Hard fork 1 month ago
Makefile Hard Fork 1 month ago
README.md Update Treafik/Docker example 1 month ago
go.mod Add support for logging the request host (virtual hosts) 1 month ago
go.sum Add support for logging the request host (virtual hosts) 1 month ago
main.go Add support for logging the request host (virtual hosts) 1 month ago
version.go Hard fork 1 month ago

README.md

Maintenance Server

Build Status License: MIT

Standalone maintenance server, serving a static "maintenance page" with a default message that the site is under maintenance.

Usage

$ go install git.mills.io/prologic/maintenance-server@latest

Example docker-compose.yml configuration:

version: '3.8'

services:
  fallback:
    image: prologic/maintenance-server
    ports:
      - 8080:8000

Acting as Traefik fallback server

If you serve containers through Traefik and you need to have a proper maintenance page during container cycling, you can attach this image as fallback with lower priority like this:

---
version: "3.8"

services:
  fallback:
    image: prologic/maintenance-server
    networks:
      - traefik
    deploy:
      replicas: 1
      labels:
        - "traefik.enable=true"
        - "traefik.docker.network=traefik"
        - "traefik.http.services.fallback.loadbalancer.server.port=8000"
        - "traefik.http.routers.fallback.rule=HostRegexp(`{catchall:.*}`)"
        - "traefik.http.routers.fallback.priority=1"
      resources:
        reservations:
          cpus: "0.1"
          memory: 16M
        limits:
          cpus: "0.2"
          memory: 32M
      restart_policy:
        condition: on-failure

networks:
  traefik:
    external: true

Other containers will have higher priority, so this one will only be considered if the other one went AWOL.

Licnese

maintenance-server is licsned under the terms of the MIT License (originally forked from @c0b41's also licensed under an MIT License).