A "simple" web-based registering tool.
clone this git repo and build docker image:
~> sudo docker build -t tuna/registr .
That's all:
~> sudo docker images | grep registr
See contents of Dockerfiles
please.
Create an empty sqlite database:
~> touch /path/to/registration.db
Then create a container with following command:
~> sudo docker run -it --rm --name=registr \
-p 80:8000 \
-v /path/to/registration.db:/data/registr.db \
-e FLASK_BASIC_AUTH_USERNAME=username \
-e FLASK_BASIC_AUTH_PASSWORD=password \
-e FLASK_SECRET_KEY='A very long secret key' \
-e "FLASK_SQLALCHEMY_DATABASE_URI=sqlite:////data/registr.db" \
-e FLASK_BABEL_DEFAULT_LOCALE=zh_Hans_CN \
tuna/registr
Options:
FLASK_BASIC_AUTH_USERNAME
: username for admin pageFLASK_BASIC_AUTH_PASSWORD
: password for admin pageFLASK_SECRET_KEY
: secret key used by flask in client-end session, keep it safe and unpredictableFLASK_BABEL_DEFAULT_LOCALE
: default locale
Currently, we support following locales:
- zh_Hans_CN
- de_DE
- ja_JP
- nl_NL
- en_US
If new one is required, install dependencies in requirements.txt
and run:
~> ./i18n init <locale-name>