From e684810ae145880cc65a105b3f0177d159cb3a69 Mon Sep 17 00:00:00 2001 From: Anton Franzluebbers Date: Sun, 6 Nov 2022 17:00:56 -0500 Subject: [PATCH] updated readme with docker install and build instructions, added template mysql config file --- .gitignore | 1 + README.md | 27 +++++++++++++++++++++++++++ velconnect/config_mysql_template.py | 4 ++++ 3 files changed, 32 insertions(+) create mode 100644 velconnect/config_mysql_template.py diff --git a/.gitignore b/.gitignore index 4a8bc6f..dbc8fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ velconnect.db velconnect*.db .idea/ velconnect/data/ +*.db.bak \ No newline at end of file diff --git a/README.md b/README.md index 44ff7b2..7a32a93 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,38 @@ ## VELConnect API Setup +### Option 1: Pull from Docker Hub: + +``` +docker run -p 80:80 velaboratory/velconnect +``` +and visit http://localhost in your browser. + +or + +```sh +docker run -p 8000:80 --name web velaboratory/velconnect +``` + to access from http://localhost:8000 in your browser and name the container "web". + +### Option 2: Build Docker Image: + +Make sure you're in the `velconnect/` folder. +``` +docker build --tag velconnect . +docker rm web +docker run -p 80:80 --name web velconnect +``` + +or run `./rebuild.sh` + +### Option 3: Run Python locally (WSL or native Linux) 1. `cd velconnect` 2. Create pip env: `python3 -m venv env` 3. Activate the env `. env/bin/activate` 4. Install packages `pip install -r requirements.txt` 5. Add `config_mysql.py` - Get from some old server + - Or copy and fill out the values from `config_mysql_template.py` 6. Run `./run_server.sh` - Or set up systemctl service: ```ini diff --git a/velconnect/config_mysql_template.py b/velconnect/config_mysql_template.py new file mode 100644 index 0000000..f55f524 --- /dev/null +++ b/velconnect/config_mysql_template.py @@ -0,0 +1,4 @@ +MYSQL_DATABASE_DB = '' +MYSQL_DATABASE_USER = '' +MYSQL_DATABASE_HOST = '' +MYSQL_DATABASE_PASSWORD = '' \ No newline at end of file