# Maintenance mode configuration for nordabiznes.pl
# Internet users → maintenance page
# INPI LAN (10.22.68.0/24) → full PROD site

# Detect maintenance mode based on source IP
geo $maintenance_mode {
    default 1;                    # Internet: show maintenance
    10.22.68.0/24 0;             # INPI LAN: show PROD
}

# Serve maintenance page to Internet users
location = /maintenance.html {
    root /data/nginx/html;
    internal;
}

# Custom error page for 503 (maintenance mode)
error_page 503 /maintenance.html;
