Skip to content

Conversation

@enwikuna
Copy link

  • Add/use environment variable NGINX_UI_NGINX_MAINTENANCE_TEMPLATE to point the app to a custom maintenance HTML template used when maintenance mode is enabled.
  • Allow the maintenance template path to be configured from the web UI as well: Settings > Nginx.
  • If a custom path is provided (env var or UI), the app will load that file from inside the container. If not provided, the built-in default template is used.
  • Document how to provide custom templates by mounting a host directory into the container:
    • Example mount: ./nginx:/etc/nginx
    • Create a maintenance folder inside that mount: ./nginx/maintenance
    • Put your template file there, e.g. ./nginx/maintenance/maintenance.html
    • Set the template path to the absolute path inside the container:
      NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=/etc/nginx/maintenance/maintenance.html
  • Notes:
    • The path must be the absolute path inside the container and the file must be readable by the nginx process (e.g., mode 644).
    • After changing the env var or updating templates (or changing the setting in Settings > Nginx), restart the container or reload nginx for changes to take effect.
    • You can store multiple templates under ./nginx/maintenance and switch between them by updating the env var or the UI setting.
  • Include example docker-compose snippet in docs:
    volumes:
    • ./nginx:/etc/nginx
      environment:
    • NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=/etc/nginx/maintenance/maintenance.html

This commit adds configuration surface and documentation for using custom maintenance templates via environment variable or the UI.

image image
services:
  nginx-ui:
    image: nginx-ui-fixed:local
    container_name: nginx-ui
    restart: always
    stdin_open: true
    tty: true
    environment:
      - TZ=Europe/Berlin
      - GIN_MODE=release
      - NGINX_UI_NGINX_MAINTENANCE_TEMPLATE=enwikuna-maintenance.html

Kindly ask you to test and merge our changes into production line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant