🧑‍💻(compose) remove --no-cache to build images by default

In order to speed the rebuild of images, the --no-cache option is
removed by default. If we want to build the images without cache, the
cache paramter must be used.
This commit is contained in:
Manuel Raynaud
2025-06-13 10:31:08 +02:00
parent 6c16e081de
commit ba4f90a607
3 changed files with 22 additions and 20 deletions

View File

@@ -86,7 +86,7 @@ jobs:
run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright chromium run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright chromium
- name: Start Docker services - name: Start Docker services
run: make bootstrap-e2e FLUSH_ARGS='--no-input' cache= run: make bootstrap-e2e FLUSH_ARGS='--no-input'
- name: Run e2e tests - name: Run e2e tests
run: cd src/frontend/ && yarn e2e:test --project='chromium' run: cd src/frontend/ && yarn e2e:test --project='chromium'
@@ -125,7 +125,7 @@ jobs:
run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright firefox webkit chromium run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright firefox webkit chromium
- name: Start Docker services - name: Start Docker services
run: make bootstrap-e2e FLUSH_ARGS='--no-input' cache= run: make bootstrap-e2e FLUSH_ARGS='--no-input'
- name: Run e2e tests - name: Run e2e tests
run: cd src/frontend/ && yarn e2e:test --project=firefox --project=webkit run: cd src/frontend/ && yarn e2e:test --project=firefox --project=webkit

View File

@@ -15,6 +15,7 @@ and this project adheres to
### Changed ### Changed
- 🧑‍💻(docker): add .next to .dockerignore #1055 - 🧑‍💻(docker): add .next to .dockerignore #1055
- 🧑‍💻(docker) handle frontend development images with docker compose #1033
### Fixed ### Fixed

View File

@@ -75,39 +75,39 @@ create-env-files: \
env.d/development/kc_postgresql env.d/development/kc_postgresql
.PHONY: create-env-files .PHONY: create-env-files
base-bootstrap: pre-bootstrap: \
base-bootstrap: \
data/media \ data/media \
data/static \ data/static \
create-env-files create-env-files
.PHONY: base-bootstrap .PHONY: pre-bootstrap
bootstrap: ## Prepare Docker images for the project post-bootstrap: \
bootstrap: \
base-bootstrap \
build \
migrate \ migrate \
demo \ demo \
back-i18n-compile \ back-i18n-compile \
mails-install \ mails-install \
mails-build \ mails-build
.PHONY: post-bootstrap
bootstrap: ## Prepare Docker developmentimages for the project
bootstrap: \
pre-bootstrap \
build \
post-bootstrap \
run run
.PHONY: bootstrap .PHONY: bootstrap
bootstrap-e2e: ## Prepare Docker production images to be used for e2e tests bootstrap-e2e: ## Prepare Docker production images to be used for e2e tests
bootstrap-e2e: \ bootstrap-e2e: \
base-bootstrap \ pre-bootstrap \
build-e2e \ build-e2e \
migrate \ post-bootstrap \
demo \
back-i18n-compile \
mails-install \
mails-build \
run-e2e run-e2e
.PHONY: bootstrap-e2e .PHONY: bootstrap-e2e
# -- Docker/compose # -- Docker/compose
build: cache ?= --no-cache build: cache ?=
build: ## build the project containers build: ## build the project containers
@$(MAKE) build-backend cache=$(cache) @$(MAKE) build-backend cache=$(cache)
@$(MAKE) build-yjs-provider cache=$(cache) @$(MAKE) build-yjs-provider cache=$(cache)
@@ -129,10 +129,11 @@ build-frontend: ## build the frontend container
@$(COMPOSE) build frontend-development $(cache) @$(COMPOSE) build frontend-development $(cache)
.PHONY: build-frontend .PHONY: build-frontend
build-e2e: cache ?=
build-e2e: ## build the e2e container build-e2e: ## build the e2e container
@$(MAKE) build-backend @$(MAKE) build-backend cache=$(cache)
@$(COMPOSE_E2E) build frontend @$(COMPOSE_E2E) build frontend $(cache)
@$(COMPOSE_E2E) build y-provider @$(COMPOSE_E2E) build y-provider $(cache)
.PHONY: build-e2e .PHONY: build-e2e
down: ## stop and remove containers, networks, images, and volumes down: ## stop and remove containers, networks, images, and volumes