Complete these steps one time in order to run an app:
- Enter virtual environment
$ python3 -m venv env
$ source env/bin/activate
- Install requirements:
(env) $ pip3 install -r requirements.txt
- Initialize database:
(env) $ python3
(env) $ from project.server import db
(env) $ db.create_all()
- Exit virtual environment
(env) $ deactivate
After initialization, you can run app using the command below:
$ chmod +x start.sh
$ ./start.sh
Open in browser on localhost via port 5000
http://localhost:5000/
Build a container using instruction from Dockerfile
.
$ docker build -t tasker .
Run a docker container. -p 3000:5000
expose port 5000 inside container to port 3000 outside.
$ docker run -p 3000:5000 tasker
You can connect to container via port 3000.
http://localhost:3000/
To run testing, use the command below:
$ chmod +x runtests.sh
$ ./runtests.sh