-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (64 loc) · 1.33 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
# MyWell
#
# PATH := node_modules/.bin:$(PATH)
PROJECT = "MYWELL"
dir = $(shell pwd)
include .mywell_config
include /tmp/mywell_env
admin_dir := $(dir)/functions/src/admin
env_dir := $(dir)/env
##
# Env Setup
##
env:
cat ${env_dir}/env.sh ${env_dir}/.env ${env_dir}/env.${stage}.${location}.sh > /tmp/mywell_env
switch:
@echo switching to stage: ${stage} ${location}
@echo 'export stage=${stage}\nexport location=${location}\n' > .mywell_config
@make env
switch-local-dev:
make switch stage="development" location="local"
make env
switch-live-dev:
make switch stage="development" location="live"
make env
switch-local-prod:
make switch stage="production" location="local"
make env
switch-live-prod:
make switch stage="production" location="live"
make env
##
# Local Development
##
build-server:
@make env
echo "building server"
cd ${dir}/mywell-server && npm install
docker-compose build
# docker-compose pull
run-server:
@make env
./run_server.sh
# run-lt:
# @make env
# @lt --subdomain ${LT_SUBDOMAIN} --port 5000
# run-local:
# @make env
# ./_run_local.sh
# deploy:
# @make env
# ./_deploy.sh
# deploy-vars:
# @make env
# ./_deploy_vars.sh
##
# Deployment
##
tag-and-push:
@make env
@./legacy_tag_and_push_docker.sh all
login-droplet:
.PHONY: switch switch-dev swich-prod env