Standalone maintenance server, serving a static "maintenance page" with a default message that the site is under maintenance.
You cannot 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
continuous-integration/drone/push Build is passing Details
Add support for logging the request host (virtual hosts)
7 months ago
.chglog Hard Fork 7 months ago
.dockerfiles Hard Fork 7 months ago
static Hard fork 7 months ago
tools Hard Fork 7 months ago
.drone.yml Hard Fork 7 months ago
.editorconfig added simple draft 4 years ago
.gitignore Hard Fork 7 months ago
.goreleaser.yml Hard Fork 7 months ago
CHANGELOG.md Update CHANGELOG for 1.1.1 7 months ago
Dockerfile Hard Fork 7 months ago
LICENSE Hard Fork 7 months ago
LICENSE.old Hard fork 7 months ago
Makefile Hard Fork 7 months ago
README.md Update Treafik/Docker example 7 months ago
go.mod Add support for logging the request host (virtual hosts) 7 months ago
go.sum Add support for logging the request host (virtual hosts) 7 months ago
main.go Add support for logging the request host (virtual hosts) 7 months ago
version.go Hard fork 7 months 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).