forked from jlg-archive/serverless-prisma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (48 loc) · 1.15 KB
/
Makefile
File metadata and controls
63 lines (48 loc) · 1.15 KB
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
# Load the environment variables
ifdef ENV
export ENV_FILE = .env.$(ENV)
else
export ENV_FILE = .env
endif
# Include the envionment variables in this Makefile
include $(ENV_FILE)
CONTAINER_NAME = serverless-prisma/devbox
NODE_CONTAINER = \
--env-file $(ENV_FILE) \
--interactive \
--rm \
--tty \
--volume $(shell pwd):/var/task \
--workdir /var/task \
$(CONTAINER_NAME)
devbox:
@docker build --no-cache --tag $(CONTAINER_NAME) .
install:
@docker run $(NODE_CONTAINER) yarn install
dev:
@docker run $(NODE_CONTAINER) /bin/bash
build:
@docker run $(NODE_CONTAINER) yarn build
start:
@docker run --publish 4000:4000 $(NODE_CONTAINER) yarn start
hard-start:
rm -rf node_modules
rm -f yarn.lock
make devbox
make install
make start
deploy:
@make deploy-prisma
@make deploy-api
deploy-api:
@docker run $(NODE_CONTAINER) yarn run deploy:api:$(ENV)
deploy-prisma:
@docker run $(NODE_CONTAINER) yarn run deploy:prisma:$(ENV)
profile:
@docker run $(NODE_CONTAINER) yarn run profile
tsc:
@docker run $(NODE_CONTAINER) yarn run tsc
tslint:
@docker run $(NODE_CONTAINER) yarn run tslint
tslint-fix:
@docker run $(NODE_CONTAINER) yarn run tslint-fix