You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have our PHP-FPM image ready, we need to add an nginx server to serve our Magento / Adobe Commerce project, communicating with PHP-FPM using fastcgi.
291
+
Now that we have our PHP-FPM image ready, we need to add a nginx server to serve our Magento / Adobe Commerce project, communicating with PHP-FPM using fastcgi.
288
292
289
293
To serve static assets in an efficient way, we'll also copy the `pub/static` directory to the nginx image.
290
294
@@ -305,7 +309,9 @@ upstream fastcgi_backend {
305
309
306
310
server {
307
311
listen 80;
308
-
server_name <your-magento-hostname>;
312
+
313
+
# server_name directive is not mandatory, as we're using the default server block
314
+
309
315
set $MAGE_ROOT /app;
310
316
set $MAGE_DEBUG_SHOW_ARGS 0;
311
317
@@ -320,33 +326,83 @@ Additionnaly, you may change the following in the resulting `vhost.conf` file:
> The complete `vhost.conf` file can be found [here](https://github.com/ClickAndMortar/magento-kubernetes/blob/main/docs/docker/nginx/vhost.nginx).
403
+
404
+
---
405
+
350
406
The resulting `Dockefile` should look like this:
351
407
352
408
```dockerfile
@@ -397,7 +453,8 @@ Then push the images to your container registry, using `docker push`.
397
453
> [!TIP]
398
454
> When cross-building images for different architectures, you may want to use the `--platform` flag to specify the target architecture, such as `linux/amd64`, `linux/arm64`, etc.
399
455
400
-
The complete `Dockerfile` can be found [here](https://github.com/ClickAndMortar/magento-kubernetes/blob/main/Dockerfile).
456
+
> [!INFO]
457
+
> The complete `Dockerfile` can be found [here](https://github.com/ClickAndMortar/magento-kubernetes/blob/main/Dockerfile).
0 commit comments