Skip to content

Commit

Permalink
♻️(docker) rename frontend-dev service in frontend
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lunika committed Feb 14, 2025
1 parent 704c4d7 commit ee4402e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -97,15 +97,15 @@ 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.

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:
Expand All @@ -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**
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ services:
condition: service_healthy
restart: true

frontend-dev:
frontend:
user: "${DOCKER_USER:-1000}"
build:
context: .
Expand Down

0 comments on commit ee4402e

Please sign in to comment.