git clone git@github.com:gerhean/multasko-backend.git- Python 3.7 or above
- Docker or Docker Toolbox to host the various servers required in a hassle free manner.
-
Ensure you have
virtualenvinstalled. -
Ensure you have GNU make installed (Windows only) (Optional).
- Install chocolatey from here.
- Then,
choco install make.
-
You can create your
virtualenv. The steps for Windows look something like as follows:make venv
This will also install all dependencies as listed in the
requirements.txtfile. -
You can activate your
virtualenv. This is not required for usingmakecommands. The steps for Windows look something like as follows:venv\Scripts\activate
You should see a
(venv)in front of the prompt on your console/terminal/command prompt. This shows your virtual environment is active. -
Set up database
flask db init flask db migrate flask db upgrade
-
Start flask server
flask run
These commands are to be executed in the base directory of this repo.
Execute them by typing a make in front of them. For example:
make venv -
Venv Helpers
- venv
- Install dependencies
- clean-venv
- Delete the venv folder
- venv
-
Server
- runserver
- Runs the server at http://localhost:5000
- runserver
Install the pip packages (i)
pip install -r requirements.txtYou can start the flask server using the command below
python manage.pyAnd now you can visit the site with the URL http://localhost:5000
You can build the image using the command below
docker build -t multasko-backend:latest .You can Run container in background using the command below
docker run -dp 5000:5000 multasko-backendAnd now you can visit the site with the URL http://localhost:5000