Skip to content

allofphysicsgraph/ui_v7_website_flask_json

Repository files navigation

This repo is the source code for the website https://derivationmap.net/, aka https://allofphysics.com.

Files not in this repo

  • certs/dhparam.pem
  • certs/fullchain.pem
  • certs/privkey.pem
  • .env

The certs/*.pem are generated by Let's Encrypt

The .env file contains three lines,

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=

How to use (for the impatient)

git clone https://github.com/allofphysicsgraph/ui_v7_website_flask_json.git
cd ui_v7_website_flask_json/flask/
docker build -t flask_ub .
docker run -it --rm -v`pwd`/data.json:/home/appuser/app/data.json \
           -v`pwd`/logs/:/home/appuser/app/logs/ \
           --publish 5000:5000 flask_ub

See developer documentation after reading the user documentation

quickstart

docker-compose up --build --remove-orphans

As a two step process:

docker-compose build --progress tty
docker-compose up

On DigitalOcean server:

docker-compose up --build --remove-orphans --detach

or

docker-compose up --build --force-recreate --remove-orphans --detach

Because software is in Docker containers (for reproducibility), the versions of the Docker software you're using matter. The software in this repo has been tested with

docker-compose instructions are from from https://github.com/ChloeCodesThings/chloe_flask_docker_demo and https://codefresh.io/docker-tutorial/hello-whale-getting-started-docker-flask/

combining flask, gunicorn, nginx is from https://testdriven.io/blog/dockerizing-flask-with-postgres-gunicorn-and-nginx/

nginx timeout https://wiki.ssdt-ohio.org/display/rtd/Adjusting+nginx-proxy+Timeout+Configuration

Licensing

Creative Commons Attribution 4.0 International License

Software Requirements

  • Docker
  • a web browser

Contributing

Before submitting code via a pull request, please open an issue (feature or bug) and describe your question or intent.

Python code is formatted using Black.