This repository has been archived by the owner on Mar 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 1.6 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
export FLASK_APP = ascmonitor.app:app
export SOURCE_COMMIT = $(shell git rev-parse HEAD)
SECRET_ENV = $(shell jq -r 'to_entries[] | "\(.key)=\"\(.value)\""' asc-secret.json)
docker-dev-build:
docker-compose -f docker-compose-dev.yaml build
docker-dev-up: docker-dev-build
docker-compose -f docker-compose-dev.yaml up
docker-prod-build:
docker-compose -f docker-compose.yaml build
docker-prod-up: docker-prod-build
docker-compose -f docker-compose.yaml up -d
docker-bash-backend:
docker exec -it $$(docker ps -f name=ascstudymonitor_app -q) bash
docker-mongo:
docker exec -it $$(docker ps -f name=ascstudymonitor_mongo -q) mongo -u root -p integration
deploy:
# not yet functional
eval $(docker-machine env asc-studymonitor)
docker-compose down
docker-compose build
docker-compose up -d
docker logs -f $(docker ps -f name=app -q)
install-client:
cd client && yarn install
build-client: install-client
cd client && yarn build
mongod:
mkdir -p ./data
mongod --dbpath=./data
flask-run: build-client
${SECRET_ENV} FLASK_ENV="development" poetry run flask run
yarn-serve: install-client
cd client && yarn serve
client-test-e2e: install-client
cd client && yarn test:e2e
tmux-yarn-serve:
tmux \
new-session 'make mongod' \; \
split-window 'make flask-run' \; \
split-window 'make yarn-serve' \;
docker-backer-upper:
docker build -t backer-upper ./backer-upper
docker run -it \
--network host --add-host mongo:127.0.0.1 \
--volume ${PWD}/asc-secret.json:/run/secrets/asc-secret \
--volume ${PWD}/etc/letsencrypt:/letsencrypt \
--env BACKER_UPPER_DEV=1 \
--entrypoint /bin/bash \
backer-upper