Skip to content

Commit f2e6292

Browse files
authored
🔨 Added new 'up' target for front-end development (#4823)
1 parent ea3376d commit f2e6292

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,17 @@ CPU_COUNT = $(shell cat /proc/cpuinfo | grep processor | wc -l )
254254
services/docker-compose.local.yml \
255255
> $@
256256

257+
258+
.stack-simcore-development-frontend.yml: .env $(docker-compose-configs)
259+
# Creating config for stack with 'local/{service}:production' (except of static-webserver -> static-webserver:development) to $@
260+
@export DOCKER_REGISTRY=local && \
261+
export DOCKER_IMAGE_TAG=production && \
262+
scripts/docker/docker-compose-config.bash -e $< \
263+
services/docker-compose.yml \
264+
services/docker-compose.local.yml \
265+
services/docker-compose.devel-frontend.yml \
266+
> $@
267+
257268
.stack-simcore-version.yml: .env $(docker-compose-configs)
258269
# Creating config for stack with '$(DOCKER_REGISTRY)/{service}:${DOCKER_IMAGE_TAG}' to $@
259270
@scripts/docker/docker-compose-config.bash -e .env \
@@ -342,6 +353,15 @@ up-devel: .stack-simcore-development.yml .init-swarm $(CLIENT_WEB_OUTPUT) ## Dep
342353
@$(_show_endpoints)
343354
@$(MAKE_C) services/static-webserver/client follow-dev-logs
344355

356+
up-devel-frontend: .stack-simcore-development-frontend.yml .init-swarm ## Every service in production except static-webserver. For front-end development
357+
# Start compile+watch front-end container [front-end]
358+
@$(MAKE_C) services/static-webserver/client down compile-dev flags=--watch
359+
# Deploy stack $(SWARM_STACK_NAME) [back-end]
360+
@docker stack deploy --with-registry-auth -c $< $(SWARM_STACK_NAME)
361+
@$(MAKE) .deploy-ops
362+
@$(_show_endpoints)
363+
@$(MAKE_C) services/static-webserver/client follow-dev-logs
364+
345365

346366
up-prod: .stack-simcore-production.yml .init-swarm ## Deploys local production stack and ops stack (pass 'make ops_disabled=1 ops_ci=1 up-...' to disable or target=<service-name> to deploy a single service)
347367
ifeq ($(target),)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This gets used only after services/docker-compose.local.yml and overrides the definition of
2+
# the static-webserver to be the only one running the dev image
3+
version: "3.8"
4+
services:
5+
static-webserver:
6+
image: ${DOCKER_REGISTRY:-itisfoundation}/static-webserver:development
7+
volumes:
8+
- ./static-webserver/client/source-output:/static-content
9+
environment:
10+
- SERVER_LOG_LEVEL=info

0 commit comments

Comments
 (0)