Skip to content

Commit efe379d

Browse files
committed
πŸ§‘β€πŸ’»(compose) --no-cache to build images is not used 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.
1 parent 6c16e08 commit efe379d

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

β€Ž.github/workflows/impress-frontend.ymlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright chromium
8787

8888
- name: Start Docker services
89-
run: make bootstrap-e2e FLUSH_ARGS='--no-input' cache=
89+
run: make bootstrap-e2e FLUSH_ARGS='--no-input'
9090

9191
- name: Run e2e tests
9292
run: cd src/frontend/ && yarn e2e:test --project='chromium'
@@ -125,7 +125,7 @@ jobs:
125125
run: cd src/frontend/apps/e2e && yarn install --frozen-lockfile && yarn install-playwright firefox webkit chromium
126126

127127
- name: Start Docker services
128-
run: make bootstrap-e2e FLUSH_ARGS='--no-input' cache=
128+
run: make bootstrap-e2e FLUSH_ARGS='--no-input'
129129

130130
- name: Run e2e tests
131131
run: cd src/frontend/ && yarn e2e:test --project=firefox --project=webkit

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to
1515
### Changed
1616

1717
- πŸ§‘β€πŸ’»(docker): add .next to .dockerignore #1055
18+
- πŸ§‘β€πŸ’»(docker) handle frontend development images with docker compose #1033
1819

1920
### Fixed
2021

β€ŽMakefileβ€Ž

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,39 +75,39 @@ create-env-files: \
7575
env.d/development/kc_postgresql
7676
.PHONY: create-env-files
7777

78-
base-bootstrap:
79-
base-bootstrap: \
78+
pre-bootstrap: \
8079
data/media \
8180
data/static \
8281
create-env-files
83-
.PHONY: base-bootstrap
82+
.PHONY: pre-bootstrap
8483

85-
bootstrap: ## Prepare Docker images for the project
86-
bootstrap: \
87-
base-bootstrap \
88-
build \
84+
post-bootstrap: \
8985
migrate \
9086
demo \
9187
back-i18n-compile \
9288
mails-install \
93-
mails-build \
89+
mails-build
90+
.PHONY: post-bootstrap
91+
92+
93+
bootstrap: ## Prepare Docker developmentimages for the project
94+
bootstrap: \
95+
pre-bootstrap \
96+
build \
97+
post-bootstrap \
9498
run
9599
.PHONY: bootstrap
96100

97101
bootstrap-e2e: ## Prepare Docker production images to be used for e2e tests
98102
bootstrap-e2e: \
99-
base-bootstrap \
103+
pre-bootstrap \
100104
build-e2e \
101-
migrate \
102-
demo \
103-
back-i18n-compile \
104-
mails-install \
105-
mails-build \
105+
post-bootstrap \
106106
run-e2e
107107
.PHONY: bootstrap-e2e
108108

109109
# -- Docker/compose
110-
build: cache ?= --no-cache
110+
build: cache ?=
111111
build: ## build the project containers
112112
@$(MAKE) build-backend cache=$(cache)
113113
@$(MAKE) build-yjs-provider cache=$(cache)
@@ -129,10 +129,11 @@ build-frontend: ## build the frontend container
129129
@$(COMPOSE) build frontend-development $(cache)
130130
.PHONY: build-frontend
131131

132+
build-e2e: cache ?=
132133
build-e2e: ## build the e2e container
133-
@$(MAKE) build-backend
134-
@$(COMPOSE_E2E) build frontend
135-
@$(COMPOSE_E2E) build y-provider
134+
@$(MAKE) build-backend cache=$(cache)
135+
@$(COMPOSE_E2E) build frontend $(cache)
136+
@$(COMPOSE_E2E) build y-provider $(cache)
136137
.PHONY: build-e2e
137138

138139
down: ## stop and remove containers, networks, images, and volumes

0 commit comments

Comments
Β (0)