Skip to content

Commit 30dfe60

Browse files
authored
Merge pull request #7 from dragoonis/refactor/upgrade-frankenphp-to-latest-#2
2 parents 2b4b449 + 1a65075 commit 30dfe60

File tree

9 files changed

+464
-186
lines changed

9 files changed

+464
-186
lines changed

Makefile

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ clean:
130130
docker-compose down -v --remove-orphans
131131

132132
# Franken Worker targets
133-
.PHONY: k6-franken-worker-products
134-
k6-franken-worker-products:
135-
@echo "Running products test against Franken Worker..."
136-
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_products.js
137-
138133
.PHONY: k6-franken-worker-products-db
139134
k6-franken-worker-products-db:
140135
@echo "Running products DB test against Franken Worker..."
@@ -145,11 +140,6 @@ k6-franken-worker-products-redis:
145140
@echo "Running products Redis test against Franken Worker..."
146141
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_products_redis.js
147142

148-
.PHONY: k6-franken-worker-customers
149-
k6-franken-worker-customers:
150-
@echo "Running customers test against Franken Worker..."
151-
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_customers.js
152-
153143
.PHONY: k6-franken-worker-customers-db
154144
k6-franken-worker-customers-db:
155145
@echo "Running customers DB test against Franken Worker..."
@@ -160,11 +150,6 @@ k6-franken-worker-customers-redis:
160150
@echo "Running customers Redis test against Franken Worker..."
161151
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_customers_redis.js
162152

163-
.PHONY: k6-franken-worker-orders
164-
k6-franken-worker-orders:
165-
@echo "Running orders test against Franken Worker..."
166-
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_orders.js
167-
168153
.PHONY: k6-franken-worker-orders-db
169154
k6-franken-worker-orders-db:
170155
@echo "Running orders DB test against Franken Worker..."
@@ -175,17 +160,7 @@ k6-franken-worker-orders-redis:
175160
@echo "Running orders Redis test against Franken Worker..."
176161
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/list_orders_redis.js
177162

178-
.PHONY: k6-franken-worker-blog
179-
k6-franken-worker-blog:
180-
@echo "Running blog test against Franken Worker..."
181-
k6 run --env BASE_URL=$(FRANKEN_WORKER_URL) k6/loadtest.js
182-
183163
# Franken targets
184-
.PHONY: k6-franken-products
185-
k6-franken-products:
186-
@echo "Running products test against Franken..."
187-
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_products.js
188-
189164
.PHONY: k6-franken-products-db
190165
k6-franken-products-db:
191166
@echo "Running products DB test against Franken..."
@@ -196,11 +171,6 @@ k6-franken-products-redis:
196171
@echo "Running products Redis test against Franken..."
197172
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_products_redis.js
198173

199-
.PHONY: k6-franken-customers
200-
k6-franken-customers:
201-
@echo "Running customers test against Franken..."
202-
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_customers.js
203-
204174
.PHONY: k6-franken-customers-db
205175
k6-franken-customers-db:
206176
@echo "Running customers DB test against Franken..."
@@ -211,11 +181,6 @@ k6-franken-customers-redis:
211181
@echo "Running customers Redis test against Franken..."
212182
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_customers_redis.js
213183

214-
.PHONY: k6-franken-orders
215-
k6-franken-orders:
216-
@echo "Running orders test against Franken..."
217-
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_orders.js
218-
219184
.PHONY: k6-franken-orders-db
220185
k6-franken-orders-db:
221186
@echo "Running orders DB test against Franken..."
@@ -226,11 +191,6 @@ k6-franken-orders-redis:
226191
@echo "Running orders Redis test against Franken..."
227192
k6 run --env BASE_URL=$(FRANKEN_URL) k6/list_orders_redis.js
228193

229-
.PHONY: k6-franken-blog
230-
k6-franken-blog:
231-
@echo "Running blog test against Franken..."
232-
k6 run --env BASE_URL=$(FRANKEN_URL) k6/loadtest.js
233-
234194
# mysql read
235195
.PHONY: k6-fpm-products-db
236196
k6-fpm-products-db:
@@ -243,11 +203,6 @@ k6-fpm-products-redis:
243203
@echo "Running products Redis test against FPM..."
244204
k6 run --env BASE_URL=$(FPM_URL) k6/list_products_redis.js
245205

246-
.PHONY: k6-fpm-customers
247-
k6-fpm-customers:
248-
@echo "Running customers test against FPM..."
249-
k6 run --env BASE_URL=$(FPM_URL) k6/list_customers.js
250-
251206
.PHONY: k6-fpm-customers-db
252207
k6-fpm-customers-db:
253208
@echo "Running customers DB test against FPM..."
@@ -258,11 +213,6 @@ k6-fpm-customers-redis:
258213
@echo "Running customers Redis test against FPM..."
259214
k6 run --env BASE_URL=$(FPM_URL) k6/list_customers_redis.js
260215

261-
.PHONY: k6-fpm-orders
262-
k6-fpm-orders:
263-
@echo "Running orders test against FPM..."
264-
k6 run --env BASE_URL=$(FPM_URL) k6/list_orders.js
265-
266216
.PHONY: k6-fpm-orders-db
267217
k6-fpm-orders-db:
268218
@echo "Running orders DB test against FPM..."
@@ -273,53 +223,36 @@ k6-fpm-orders-redis:
273223
@echo "Running orders Redis test against FPM..."
274224
k6 run --env BASE_URL=$(FPM_URL) k6/list_orders_redis.js
275225

276-
.PHONY: k6-fpm-blog
277-
k6-fpm-blog:
278-
@echo "Running blog test against FPM..."
279-
k6 run --env BASE_URL=$(FPM_URL) k6/loadtest.js
280-
281226
# Batch testing targets
282227
.PHONY: k6-all-franken-worker
283228
k6-all-franken-worker:
284229
@echo "Running all tests against Franken Worker..."
285-
$(MAKE) k6-franken-worker-products
286230
$(MAKE) k6-franken-worker-products-db
287231
$(MAKE) k6-franken-worker-products-redis
288-
$(MAKE) k6-franken-worker-customers
289232
$(MAKE) k6-franken-worker-customers-db
290233
$(MAKE) k6-franken-worker-customers-redis
291-
$(MAKE) k6-franken-worker-orders
292234
$(MAKE) k6-franken-worker-orders-db
293235
$(MAKE) k6-franken-worker-orders-redis
294-
$(MAKE) k6-franken-worker-blog
295236

296237
.PHONY: k6-all-franken
297238
k6-all-franken:
298239
@echo "Running all tests against Franken..."
299-
$(MAKE) k6-franken-products
300240
$(MAKE) k6-franken-products-db
301241
$(MAKE) k6-franken-products-redis
302-
$(MAKE) k6-franken-customers
303242
$(MAKE) k6-franken-customers-db
304243
$(MAKE) k6-franken-customers-redis
305-
$(MAKE) k6-franken-orders
306244
$(MAKE) k6-franken-orders-db
307245
$(MAKE) k6-franken-orders-redis
308-
$(MAKE) k6-franken-blog
309246

310247
.PHONY: k6-all-fpm
311248
k6-all-fpm:
312249
@echo "Running all tests against FPM..."
313-
$(MAKE) k6-fpm-products
314250
$(MAKE) k6-fpm-products-db
315251
$(MAKE) k6-fpm-products-redis
316-
$(MAKE) k6-fpm-customers
317252
$(MAKE) k6-fpm-customers-db
318253
$(MAKE) k6-fpm-customers-redis
319-
$(MAKE) k6-fpm-orders
320254
$(MAKE) k6-fpm-orders-db
321255
$(MAKE) k6-fpm-orders-redis
322-
$(MAKE) k6-fpm-blog
323256

324257
.PHONY: k6-all-environments
325258
k6-all-environments:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Before starting the application, you need to pull the required Docker images. Yo
5454

5555
**Option 1: Pull all images at once**
5656
```bash
57-
make docker
57+
make pull-docker
5858
```
5959

6060
**Option 2: Pull individual images**

docker/Caddyfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
worker {
77
file ./public/index.php
88
watch
9+
910
num 1 # change number of worker
11+
12+
## Uncomment for incorrect config
13+
# num_threads 16
14+
# max_threads 8
15+
16+
## Uncomment for correct config
17+
# num_threads 16
18+
# max_threads 32
1019
}
1120

1221
php_ini memory_limit 512M
@@ -15,8 +24,7 @@
1524

1625
{$SERVER_NAME:localhost} {
1726
root {$SERVER_ROOT:public/}
18-
encode zstd br gzip
19-
27+
encode zstd br gzip
2028

2129
{$CADDY_SERVER_EXTRA_DIRECTIVES}
2230

docker/Caddyfile.regular

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
{$SERVER_NAME:localhost} {
1111
root {$SERVER_ROOT:public/}
12-
encode zstd br gzip
13-
12+
encode zstd br gzip
1413

1514
{$CADDY_SERVER_EXTRA_DIRECTIVES}
1615

docker/Dockerfile.franken

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM dunglas/frankenphp
1+
FROM dunglas/frankenphp:php8.4-bookworm
22

33
WORKDIR /var/www/html
44

@@ -8,6 +8,8 @@ RUN install-php-extensions \
88
zip \
99
opcache
1010

11+
RUN apt update -y && apt install -y jq
12+
1113
COPY --chown=www-data:www-data . .
1214
COPY ./docker/symfony.prod.ini /usr/local/etc/php/conf.d/symfony.prod.ini
1315
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

0 commit comments

Comments
 (0)