forked from CarletonSLAM/ieee-office-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
22 lines (20 loc) · 855 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
setup:
# Copy git hooks into .git foler
cp -v .github/hooks/* ./git/hooks/
deploy-heroku:
git checkout dev
git branch -D deploy-heroku; true
$(MAKE) -C frontend build-prod
git checkout -b deploy-heroku
git add .
git commit -m "Deploy at $$(date +%s)"
heroku buildpacks:clear
heroku buildpacks:set https://github.com/timanovsky/subdir-heroku-buildpack
heroku buildpacks:add heroku/python
heroku config:set PROJECT_PATH=backend
heroku config:set DJANGO_SECRET_KEY=$$(python3 -c 'from django.core.management import utils; print(utils.get_random_secret_key())')
git push -f heroku deploy-heroku:master
heroku run DJANGO_SETTINGS_MODULE=dashyserver.settings.prod python3 manage.py migrate
heroku config:unset DISABLE_COLLECTSTATIC
heroku run DJANGO_SETTINGS_MODULE=dashyserver.settings.prod python3 manage.py collectstatic
git checkout dev