Skip to content

Commit cd882c8

Browse files
committed
πŸ§‘β€πŸ’»(nginx) add nginx-frontend
To test easily a build application with nginx, we add a nginx-frontend to serve the static files of the application, it will help us to test the application in a more production-like environment.
1 parent 53c51a3 commit cd882c8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

β€ŽMakefileβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ build-e2e: ## build the e2e container
214214
@$(COMPOSE_E2E) build y-provider $(cache)
215215
.PHONY: build-e2e
216216

217+
nginx-frontend: ## build the nginx-frontend container
218+
@$(COMPOSE) up --force-recreate -d nginx-frontend
219+
.PHONY: nginx-frontend
220+
217221
down: ## stop and remove containers, networks, images, and volumes
218222
@$(COMPOSE_E2E) down
219223
.PHONY: down

β€Žcompose.ymlβ€Ž

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@ services:
129129
condition: service_healthy
130130
restart: true
131131

132+
nginx-frontend:
133+
image: nginx:1.25
134+
ports:
135+
- "3000:3000"
136+
volumes:
137+
- ./src/frontend/apps/impress/conf/default.conf:/etc/nginx/conf.d/impress.conf
138+
- ./src/frontend/apps/impress/out:/app
139+
depends_on:
140+
keycloak:
141+
condition: service_healthy
142+
restart: true
143+
132144
frontend-development:
133145
user: "${DOCKER_USER:-1000}"
134146
build:

0 commit comments

Comments
Β (0)