A simple shop application for demonstration.
Technologies utilized in the application:
- Python3
- Vanilla JavaScript/ajax
- Flask
- Flask-login
- Flask-wtforms
- SQLAalchemy
- Postgresql
- Bootstrap
- Docker, DockerCompose
In order to install and launch the application, please follow the steps below:
-
If you do not have git, please install it.
-
Clone the repository from the GitHub using this command: git clone https://github.com/Nooruzbai/flask_shop_app.git
-
After cloning the repository, please go to cloned folder and execute the commands in Linux or Windows command line bellow:
-
Create virtual environment:
python3 -m venv venv. -
Activate the virtual environment:
for Linux: source venv/bin/activate
for Windows: python3 venv\Scripts\activate -
Install the dependencies:
pip install -r requirements.txt -
In the main directory "flask_shop_app" create a ".env" file.
-
Fill the ".env" file with data:
SECRET_KEY=create a secret key
POSTGRES_HOST=localhost
Attention: If you want to run in docker services please change the DATABASE HOST part in "database_url"
in source/__init__.py file such database_url = f'postgresql://{postgres_user}:{postgres_password}@db/{postgres_database}'
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
UPLOAD_PATH=source/static/uploads
-
In the main directory "flask_shop_app" create a ".flaskenv" file.
-
Fill the file with folowing data:
FLASK_APP="source"
FLASK_DEBUG=TRUE(In development mode, if not put FALSE) -
If you are running "Docker" services please run: sudo docker compose up --build
-
If you want to run locally please run: flask run
-
Please register and login with right credentials.
If you have encountered any issues, please write me to "nooruzbay@gmail.com".