filipsyn / mojesberna

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moje Sběrna

About

Web application for managing recycling center.

Development setup

Prerequisites

Using GNU/Make (optional)

If you have GNU/Make installed on your system (usually can be found on UNIX-based systems or in WSL), you can use prepared scripts listed in Makefile.

# Installs the project
make install 

# Runs docker container and development server
make on

Be sure to check out Makefile for other useful scripts to use when developing.

Manually for Unix-based systems (Linux, MacOS, ...)

Set environmental variables

export FLASK_APP='src/app.py'
cp .example.env .env

Create and set-up virtual environment

python -m venv venv
source venv/bin/activate
pip install -r src/requirements.txt

Spin up docker database image

docker-compose up -d

Prepare database

flask prepare-database

After that, everything is ready to go. You can run application with:

flask run --port 8080 --host 0.0.0.0

Manually for Windows (PowerShell)

Set environmental variables

$env:FLASK_APP = 'src/app.py'
Copy-Item .example.env .env

Create and set-up virtual environment

python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r src/requirements.txt

Spin up docker database image

docker-compose up -d

Prepare database

flask prepare-database

After that, everything is ready to go. You can run application with:

flask run --port 8080 --host 0.0.0.0

Development guidelines

Here you can read more about some code guidelines.

Used technologies

  • Python
  • Flask
  • SQLAlchemy
  • Docker
  • PostgreSQL
  • HTML
  • CSS

About


Languages

Language:Python 54.2%Language:Jinja 32.9%Language:CSS 11.0%Language:Dockerfile 1.0%Language:Mako 0.5%Language:Makefile 0.4%Language:Shell 0.1%