From 3191d890f37874b33aaef4a99d4b8f228d530a59 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Fri, 14 Feb 2025 13:10:35 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F(docker)=20rename=20frontend-?= =?UTF-8?q?dev=20service=20in=20frontend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The frontend-dev service is in fact using the production image. We rename it in frontend accordingly with what it really does. We also have to change name rules in Makefile to be consistent. --- Makefile | 10 +++++----- README.md | 10 +++++----- docker-compose.yml | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 17690837..ea5fdbc5 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-dev $(cache) + @$(COMPOSE) build frontend $(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-dev + @$(COMPOSE) up --force-recreate -d frontend .PHONY: run status: ## an alias for "docker compose ps" @@ -306,16 +306,16 @@ help: .PHONY: help # Front -frontend-install: ## install the frontend locally +frontend-development-install: ## install the frontend locally cd $(PATH_FRONT_IMPRESS) && yarn -.PHONY: frontend-install +.PHONY: frontend-development-install frontend-lint: ## run the frontend linter cd $(PATH_FRONT) && yarn lint .PHONY: frontend-lint run-frontend-development: ## Run the frontend in development mode - @$(COMPOSE) stop frontend-dev + @$(COMPOSE) stop frontend cd $(PATH_FRONT_IMPRESS) && yarn dev .PHONY: run-frontend-development diff --git a/README.md b/README.md index a1bf9e6c..c024440b 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,9 @@ $ docker -v Docker version 20.10.2, build 2291f61 -$ docker compose -v +$ docker compose version -docker compose version 1.27.4, build 40524192 +Docker Compose version v2.32.4 ``` > ⚠️ You may need to run the following commands with sudo but this can be avoided by adding your user to the `docker` group. @@ -97,7 +97,7 @@ password: impress 📝 Note that if you need to run them afterwards, you can use the eponym Make rule: ```shellscript -$ make run-with-frontend +$ make run ``` ⚠️ For the frontend developer, it is often better to run the frontend in development mode locally. @@ -105,7 +105,7 @@ $ make run-with-frontend To do so, install the frontend dependencies with the following command: ```shellscript -$ make frontend-install +$ make frontend-development-install ``` And run the frontend locally in development mode with the following command: @@ -117,7 +117,7 @@ $ make run-frontend-development To start all the services, except the frontend container, you can use the following command: ```shellscript -$ make run +$ make run-backend ``` **Adding content** diff --git a/docker-compose.yml b/docker-compose.yml index 7de86335..84ad1b03 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -145,7 +145,7 @@ services: condition: service_healthy restart: true - frontend-dev: + frontend: user: "${DOCKER_USER:-1000}" build: context: .