Your demo project
You can clone this repository
git clone https://github.com/eocode/App
- app (Flask configurations project)
- init (Create and initialize app)
- config (All settings environments)
- connection (Settings for SQLAlchemy)
- envs (Injectable envs in app)
- commands (Tools for switch environments and other quick utilities)
- img (Project images for documentation)
- requirements (Dependencies files for app)
- test
- migrations (Migrations files, not public, disabled by gitignore)
- labs (Labs for create quick scripts for analize problem, you can disabled by gitignore)
- modules Your project modules
- example (Main blueprint Flask module)
- Flask
- python-dotenv
- Flask-sqlalchemy
- Psycopg2
- Pytest
- Flask-migrate
Edit envs/.env.* and add your configuration
Then execute:
python app/commands/environment.py development
Available params:
- production
- testing
- development
To install this project just type
Create virtual enviroment:
$ python -m venv env
Active your enviroment
Install dependencies
$ pip install -r requirements.txt
Run the project
$ flask run
Start app
docker compose up -d
Stop app
docker compose down
Rebuild app
docker-compose up -d --build
Access to command line interface
docker exec -it flask-app bash
By default migrations foldar has been add to .gitignore
Open Terminal
docker exec -it flask-app bash
Init database migrations
flask db init
Generate migrations
flask db migrate
Run migrations
flask db upgrade
Show more commands
flask db
On Docker
docker-compose exec queens-app pytest
or only
pytest
coverage run -m pytest
coverage report
coverage html
Your image project previews
- Review our code of conduct