- 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
- cd into ISUCalendarGen
- run
make docker-build
- run
docker compose up -d db - run
docker compose up --build flaskapp
- run
docker exec -it db psql -U postgres - run
\dtto see all tables - run
\d calendarto see columns/info on calendar table - run
select * from calendar;to see all rows in calendar table
- 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 -ato see all containers - run
docker stop flaskapp - run
docker rm flaskapp - look at the output of
docker ps -aand 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)
- install package manager Chocolatey if you don't have it: https://chocolatey.org/install#individual
- run
choco install make
- install docker here: https://docs.docker.com/get-docker/
-
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