Installation

Docker

You can use the docker image on the docker hub. It is using the same latest code as the Github repo.

icbest/giftmanager

Run the following command to run the container:

docker run -p [published-port]:5000 -d -v /path/to/data:/app/data icbest/giftmanager 

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.

  1. Download the app folder in the main repository.

  2. Make sure to put the folder is unzipped and in a directory that make sense to you.

  3. Inside the main directory, install requirements.txt with the following command:

pip install -r requirements.txt
  1. 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

flask run --host=0.0.0.0
  1. If everything run fine, you can deploy in production with Gunicorn.

gunicorn app:app -w 1 --threads 4 -b 0.0.0.0:80 

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 .

  1. Go to setup and follow the steps

Last updated