Skip to content

dannycrief/flask_scheduler

Repository files navigation

Flask Scheduler

Simple Flask Scheduler project

Getting Started

This project was created as a Homework for SkillFactory. Module E9. PWS-6.

Start using this project

What you need to do for correctly start using it?

  • Clone or download my project
git clone [email protected]:dannycrief/flask_scheduler.git
  • Go to project folder
cd flask_scheduler

Environments settings

  • Create .env file and put code below in it
FLASK_ENV=development
FLASK_DEBUG=True
SECRET_KEY='your-secret-key'
FLASK_APP=app/routes.py
DATABASE_URL='postgresql://user:password@localhost:5432/db-name'
PYTHONPATH=.
POSTS_PER_PAGE=3

Alembic settings

  • Create alembic migrations. Initialize alembic
PYTHONPATH=. alembic init alembic
  • Commit Changes
PYTHONPATH=. alembic revision --autogenerate -m "initial migration" 
  • Confirm migrations
PYTHONPATH=. alembic upgrade head
  • Modify alembic config in alembic.ini
sqlalchemy.url = postgresql://user:password@localhost:5432/db-name

Docker settings

  • Build Docker
docker-compose build
  • Fist of all up postgres container
docker-compose up postgres
  • And up all containers
docker-compose up

Author