Installation
Docker Compose
You can use the docker image on the docker hub. It is using the same latest code as the folder "Docker" on the Github repo.
To use Docker Compose, copy, on your machine, the file docker-compose.yml from the repo.
You will need to edit the volume path to keep your data files in the correct folder.
Modify only this part C:/Users/user1/documents/data
to mount the folder on your machine.
When updating, keep the files where they are and just create a new container but mount it to the same folder on the host machine.
Edit the port you want to expose on the web.
To run the container enter the directory of your docker-compose.yml file then in the terminal execute the following command:
You should see the image being pulled and the flask app being started.
Now head to setup and follow the steps to configure the app.
Docker Run
You can use the docker image on the docker hub. It is using the same latest code as the folder "Docker" on the Github repo.
Run the following command to run the container:
Change the port on which you want to access, making the command like that: 80:5000 you could now access on port 80 in browser.
Make sure to add a path so the app can store the data on the host machine like that:
Linux: /root/data:/app/data
Windows: C:/Users/user1/documents/data:/app/data
When updating, keep the files where they are and just create a new container but mount it to the same folder on the host machine.
Now head to setup and follow the steps to configure the app.
Python Gunicorn (Linux Only)
Make sure you have latest Python installed and Pip.
Download the app folder in the main repository.
Make sure to put the folder is unzipped and in a directory that make sense to you.
Inside the main directory, install requirements.txt with the following command:
Still inside the
app.py
directory run the command bellow to make sure everything is working and see the errors messages if any. You can access on port 5000
If everything run fine, you can deploy in production with Gunicorn.
Here the command -w 1
: The number of workers, i recommend on 1 because using a json database it does some glitch with multiple workers. For faster loading time we use 4 threads which remains on one workers to prevent glitches. -b 0.0.0.0:80
: The publish port, use port 80 so you can access it on default http. app:app
: Define the file for the app.py .
Go to setup and follow the steps
Last updated