Skip to content

Commit

Permalink
deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Musa-Azeem committed Feb 24, 2024
1 parent 4a4f9d2 commit 9e18ed3
Show file tree
Hide file tree
Showing 7 changed files with 478 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.DS_Store
Brewfile
env
build
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Our [Wiki](https://github.com/SCCapstone/K3MS/wiki) provides an overview of our
## Start the Servers (Individually, for development)
- In the `backend` directory, run `python3 run_debug_server.py` with the environment activated
- In the `frontend/app` directory, run `npm start`
- In the `frontend/app` directory, run `npm run dev`
## Start the Servers (Production)
- Run the start script with `./run_app.sh` to start the gunicorn flask server and to serve the static react build.
Expand All @@ -57,6 +57,22 @@ Our [Wiki](https://github.com/SCCapstone/K3MS/wiki) provides an overview of our
## TODO:
- Installation & setup process will be taken care of in a docker file.
# Deploy to Heroku
## Backend
- Install Heroku CLI and login
- in `/backend`, run `echo "web: gunicorn app:app" > Procfile`
- in `/backend`, add heroku git repo as a remote: `git init && git remote add heroku <heroku git url>`
- track `master` in heroku with current branch: `git branch -u heroku/master`
- commit changes: `git commit -am ""`
- push changes to heroku: `git push HEAD:master`
- Optionally, remove `heroku` remote
## Frontend
- Same steps as backend, but:
- init the git repo in `/frontend/app`
- the Procfile is `web: npm start`
- run `npm run build` before pushing changes to heroku remote
# Testing
- Unit and Behavorial tests are implemented with Cypress
Expand Down
1 change: 0 additions & 1 deletion frontend/Procfile

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/coverage

# production
/build
#/build

# misc
.DS_Store
Expand Down
1 change: 1 addition & 0 deletions frontend/app/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: npm start
Loading

0 comments on commit 9e18ed3

Please sign in to comment.