diff --git a/Makefile b/Makefile index ea5fdbc5..d917b391 100644 --- a/Makefile +++ b/Makefile @@ -108,7 +108,7 @@ build-yjs-provider: ## build the y-provider container build-frontend: cache ?= build-frontend: ## build the frontend container - @$(COMPOSE) build frontend $(cache) + @$(COMPOSE) build frontend-development $(cache) .PHONY: build-frontend down: ## stop and remove containers, networks, images, and volumes @@ -128,7 +128,7 @@ run-backend: ## Start only the backend application and all needed services run: ## start the wsgi (production) and development server run: @$(MAKE) run-backend - @$(COMPOSE) up --force-recreate -d frontend + @$(COMPOSE) up --force-recreate -d frontend-development .PHONY: run status: ## an alias for "docker compose ps" @@ -315,7 +315,7 @@ frontend-lint: ## run the frontend linter .PHONY: frontend-lint run-frontend-development: ## Run the frontend in development mode - @$(COMPOSE) stop frontend + @$(COMPOSE) stop frontend frontend-development cd $(PATH_FRONT_IMPRESS) && yarn dev .PHONY: run-frontend-development diff --git a/docker-compose.yml b/docker-compose.yml index fefbd880..f9025850 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -147,17 +147,21 @@ services: condition: service_healthy restart: true - frontend: + frontend-development: user: "${DOCKER_USER:-1000}" build: context: . dockerfile: ./src/frontend/Dockerfile - target: frontend-production + target: impress-dev args: API_ORIGIN: "http://localhost:8071" PUBLISH_AS_MIT: "false" SW_DEACTIVATED: "true" image: impress:frontend-development + volumes: + - ./src/frontend:/home/frontend + - /home/frontend/node_modules + - /home/frontend/apps/impress/node_modules ports: - "3000:3000"