Skip to content

Commit 89b1a1c

Browse files
committed
Add simulation target to Makefile for production environment setup
1 parent 4271dc1 commit 89b1a1c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ help:
3030
build: ## Build the container
3131
@docker build --platform $(PLATFORM) -t $(IMG_NAME) .
3232

33+
simulation: ## Start production environment in simulation mode
34+
@docker run --rm -it \
35+
-e NODE_ENV=production \
36+
-e NODE_TLS_REJECT_UNAUTHORIZED=0 \
37+
--add-host host.docker.internal:host-gateway \
38+
--platform $(PLATFORM) \
39+
--network dev \
40+
--name $(APP_NAME) \
41+
-p $(APP_WEB_PORT):3000 \
42+
-p $(APP_WEB_PORT_SECURE):3443 \
43+
-p $(APP_API_PORT):4000 \
44+
-p $(APP_API_PORT_SECURE):4443 \
45+
-v $(CURDIR):/data \
46+
$(IMG_NAME)
47+
3348
prod: ## Start production environment
3449
@docker run --rm -it \
3550
-e NODE_ENV=production \

0 commit comments

Comments
 (0)