This repo is the source code for the website https://allofphysics.com, aka https://derivationmap.net/. See developer documentation after reading the user documentation
You won't be able to immediately use the code because there are four files which you need to create associated with SSL certificates:
certs/dhparam.pemcerts/fullchain.pemcerts/privkey.pem.env
How to generate those files depends on whether you're running a website locally or on the Internet.
If you are on a local computer then see certs/README.md for instructions on generating local certificates.
The .env file contains three lines,
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=If you are on a local computer then you can set the values to be random strings.
If you are putting a webpage on the Internet then certs/*.pem are generated by Let's Encrypt.
See https://physicsderivationgraph.blogspot.com/2021/10/periodic-renewal-of-https-letsencrypt.html
The .env file contains three lines,
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SECRET_KEY=If you are putting a webpage on the Internet then the string values come from Google Cloud Console under "APIs & Services" > "Credentials" by creating a "Web application" type client.
For Docker installation see https://docs.docker.com/desktop/install
Assuming you already have git and docker available,
git clone https://github.com/allofphysicsgraph/ui_v7_website_flask_json.gitIf running locally,
cd ui_v7_website_flask_json/flask/
make docker_build
cd ..
make launch_webserver_interactive See developer documentation after reading the user documentation
docker compose up --build --remove-orphansAs a two step process:
docker-compose build --progress tty
docker-compose upOn DigitalOcean server:
docker-compose up --build --remove-orphans --detachor
docker-compose up --build --force-recreate --remove-orphans --detach- Docker
gitmake- a web browser
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 versionyields "2.34.0-desktop.1" on a Mac Airbook arm64; "v2.2.1" on a Mac Airbook amd64- Compose file format 3.6; see https://docs.docker.com/reference/compose-file/
docker --versionyields "Docker version 28.0.4, build b8034c0" on a Mac Airbook arm64; "Docker version 20.10.11" on a Mac Airbook amd64 See https://docs.docker.com/compose/compose-file/compose-versioning/ for compatibility of versions.
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
Unless otherwise noted, all source code is covered by the Creative Commons Attribution 4.0 International License
See CONTRIBUTING.md for guidance.
#EOF