-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
43 lines (31 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Make Supportal
STAGE?=dev
INFRASTRUCTURE?=dev
install:
pipenv install
install-gdal-ubuntu:
sudo apt-get update -y
sudo apt-get install -y libgdal-dev
install-dev:
pipenv install -d
install-dev-ubuntu: install-gdal-ubuntu
pipenv install -d
test: install-dev
pipenv run test
install-deploy-dependencies:
npm install
create-domain: install-deploy-dependencies
sls create_domain -s $(STAGE) --infrastructure $(INFRASTRUCTURE)
deploy-preflight: install-deploy-dependencies
(export STAGE=$(STAGE) && export INFRASTRUCTURE=$(INFRASTRUCTURE) && ./make-deploy-preflight)
run-preflight: deploy-preflight
(export STAGE=$(STAGE) && export INFRASTRUCTURE=$(INFRASTRUCTURE) && ./make-run-preflight)
deploy: install-deploy-dependencies create-domain
sls deploy -s $(STAGE) --infrastructure $(INFRASTRUCTURE)
deploy-with-preflight: install-deploy-dependencies create-domain run-preflight
sls deploy -s $(STAGE) --infrastructure $(INFRASTRUCTURE)
# Run the migrations again. Because migrations are idempotent it shouldn't be
# a problem to just run them again after a deploy. This "re-run" ensures that if
# this is your first time standing up the edge stage, the database does get
# migrated
sls wsgi manage -c "migrate" -s $(STAGE) --infrastructure $(INFRASTRUCTURE)