Skip to content

About

An .ics class calendar generator for ISU students.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

202 Commits

Folders and files

Repository files navigation

ISU Calendar Generator

A web application that generates an .ics calendar file for ISU classes

Steps to Run from Terminal

  • cd into ISUCalendarGen
  • make sure you have .env file to connect to remote postgresql instance (don't push this file to git)
  • if you're using a virtualenv, active it (run source venv/bin/activate)
  • install dependencies by running pip install -r requirements.txt
  • cd into src/
  • run flask run

Steps to run locally with Docker compose

  • cd into ISUCalendarGen
  • run make docker-build

What's happening in docker-build? Look in Makefile:

  • run docker compose up -d db
  • run docker compose up --build flaskapp

You can view the database within the docker container as well:

  • run docker exec -it db psql -U postgres
  • run \dt to see all tables
  • run \d calendar to see columns/info on calendar table
  • run select * from calendar; to see all rows in calendar table

To clean up all the docker stuff (you should do this to rebuild everything)

  • run make docker-clean

The following is what's happening when you run the make command:

  • if flask app is still running hit Control+C to stop it
  • run docker ps -a to see all containers
  • run docker stop flaskapp
  • run docker rm flaskapp
  • look at the output of docker ps -a and get the CONTAINER ID for postgres:12 (this changes each time you build the docker container)
  • run docker stop <insert CONTAINER ID of postgres:12>
  • run docker rm <insert CONTAINER ID of postgres:12>
  • run docker volume prune -f (this deletes db data)

If you're on Windows and don't have make

If you don't have Docker

Steps to deploy to Heroku

  • install heroku cli: https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli

  • cd into ISUCalendarGen

  • run docker build -t flaskapp .

  • run heroku login

  • run heroku container:login

  • run heroku container:push web -a isucalendargen

  • run heroku container:release web -a isucalendargen

  • To open in browser: run heroku open -a isucalendargen

  • To look at live logs: run heroku logs --tail -a isucalendargen

About

An .ics class calendar generator for ISU students.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages