Skip to content

Commit 9011cd9

Browse files
committed
Update Makefile
1 parent acf93cf commit 9011cd9

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

Makefile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@ init:
99
build:
1010
docker build -t $(IMGNAME) .
1111

12-
push:
13-
docker push $(IMGNAME)
14-
1512
compile:
16-
docker exec -it $(APPNAME) yarn build
13+
@docker run --rm -it \
14+
-e NODE_ENV=development \
15+
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
16+
--add-host host.docker.internal:host-gateway \
17+
--name $(APPNAME) \
18+
--network dev \
19+
-p $(APPPORT):7200 \
20+
-v $(CURDIR):/usr/src/app \
21+
$(IMGNAME) yarn build
1722

1823
dev:
1924
@docker run -it --rm \
@@ -26,6 +31,17 @@ dev:
2631
-v $(CURDIR):/usr/src/app \
2732
$(IMGNAME) yarn start:dev
2833

34+
prod:
35+
@docker run -it --rm \
36+
-e NODE_ENV=production \
37+
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
38+
--add-host host.docker.internal:host-gateway \
39+
--name $(APPNAME) \
40+
--network dev \
41+
-p $(APPPORT):7200 \
42+
-v $(CURDIR):/usr/src/app \
43+
$(IMGNAME) yarn start:prod
44+
2945
exec:
3046
@docker run -it --rm \
3147
--add-host host.docker.internal:host-gateway \

0 commit comments

Comments
 (0)