- Python 3.7.10
- Pipenv
- Clone the Git repository and goto the project root directory.
git clone https://gitlab.ergov.com/abid/parking-lot-monitoring.git
cd parking-lot-monitoring
cp .env.example .env
- Install the dependencies using pipenv and activate virtual environment.
pipenv install
pipenv shell
- Run the server using the below command
pipenv run flask run
The application can be browse with the below URL.
http://localhost:5000
A couple of helper commands are given below.
- DB initialization
pipenv run flask db init
- Migrate the database
pipenv run flask db migrate
- Create/ run Postgres/ Pgadmin container
docker pull postgres
docker run -p 5432:5432 --name postgresdb -e POSTGRES_PASSWORD=admin -d postgres
docker pull dpage/pgadmin4
docker run -p 5050:80 -e "[email protected]" \
-e "PGADMIN_DEFAULT_PASSWORD=password" \
-d dpage/pgadmin4
# Create DB user for the project
create database parking_lot;
create user parking_lot with encrypted password 'password';
grant all privileges on database parking_lot to parking_lot;
# Login to the DB (host/ username maybe change accordingly)
psql -h 127.0.0.1 -d parking_lot -U admin -p 5432
An useful user data script while launching Amazon EC2 instance to deploy flask project. Flask Deployment in AWS
Special thanks to ParkingLot Repository.