Giter VIP home page Giter VIP logo

docker_wui's Introduction

docker_wui

This docker image is based on nginix 1.15.6, which itself is based on debian-slim (which is version 9 AKA Stretch).

It provides the following:

  • Nginx serving up at port 80
  • A refresh script for mirroring the content in a READ ONLY Minio bucket.

It also has access logging turned on by default, and this is piped through to the docker logs interface.

The intention is that this container will be used to serve up static content and WUIs securely.

Usage

Bringing the webserver up

  • Run the Docker container as per normal: docker run -d -p <Port to expose Nginx>:80 -e CONTENT_URL=<Path to READ ONLY Minio bucket with content> docker_wui:latest -n <container name>

Copying in Data

Via Docker

  • Use the docker copy command: docker cp <path to files to copy>/. <container image ID or name>:/usr/share/nginx/html/

Via db-utils

NO LONGER SUPPORTED

  • Copy a secrets file into the container: docker cp <path to secrets file> <container image ID or name>:/tmp/
  • Use the docker exec command to run the utility script in the docker container: docker exec <container image ID or name> PYTHONPATH=/usr/share/nginx/db-utils python3 /home/nginx/db-utils/bin/minio_bucker_dir_sync.py -s minio://<bucket name> -c <city classification> -d /usr/share/nginx/html/<any additional path goes here> -x /tmp/secrets.json

Via refresh.sh

  • When the container starts up, specify the environmental variable CONTENT_URL, pointing to a READ ONLY minio bucket with the content.
  • At any type the content may be refreshed by rerunning the script, i.e. docker exec -it <container ID/name> sh -c "/refresh.sh"
  • The script also accepts positional arguments, i.e. docker exec -it <container ID/name> sh -c "/refresh.sh CONTENT_URL CONTENT_DIR"

Copying out Data

Via Docker

  • Use the docker logs command: docker logs <container ID or name>

docker_wui's People

Contributors

gordonei avatar cityofcapetown-opm-bot avatar

Watchers

James Cloos avatar  avatar Riaz Arbi avatar

docker_wui's Issues

Add Goaccess

Goaccess gives us a good way to see how much a WUI is being used. As the number of static sites increases, this will become more and more important - it'll give us a way of finding out whether a tool should be retired or not. It'll help us kill zombie reports.

Add optional simple NGINX password

One can add simple HTTP password protection to NGINX.

Add an environmental variable to set the password. -e PASSWORD=<password> along with a sed to inject into NGINX conf file at runtime.

Mucho convenient for ad-hoc tools that are restricted or confidential.

Bonus points if we include a little utility that can change the password with a docker exec -it <container-name> new_password "NEW_PASSWORD" for password rotation.

Literature : see -

https://www.digitalocean.com/community/tutorials/how-to-set-up-basic-http-authentication-with-nginx-on-ubuntu-14-04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.