-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd182f6
commit b8f8a18
Showing
5 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: 2.4.7 Bookworm - Build and Push Docker Image to Docker Hub | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 2.4.7/bookworm/** | ||
- config/** | ||
|
||
jobs: | ||
build-and-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: ./2.4.7/bookworm/Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: clickandmortar/magento:2.4.7-bookworm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM php:8.3.7-fpm-bookworm AS php | ||
|
||
ENV MAGE_MODE=production | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
libfreetype6-dev libicu-dev libjpeg62-turbo-dev libpng-dev libxslt1-dev libzip-dev libwebp-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ | ||
&& docker-php-ext-install -j$(nproc) bcmath gd intl pdo_mysql soap sockets xsl zip | ||
|
||
RUN curl -sSL https://getcomposer.org/download/latest-2.x/composer.phar -o /usr/local/bin/composer \ | ||
&& chmod +x /usr/local/bin/composer | ||
|
||
WORKDIR /app | ||
|
||
COPY config/php/custom.ini /usr/local/etc/php/conf.d/90-magento.ini | ||
COPY config/php/www.conf /usr/local/etc/php-fpm.d/www.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# magento-docker | ||
Magento / Adobe Commerce base Docker images | ||
# Magento Docker | ||
|
||
Magento / Adobe Commerce base Docker images for production usage. | ||
|
||
## Available images | ||
|
||
| Name | Version | PHP version | Dockerfile | Architectures | Tags | | ||
|--------------------------|---------|-------------|-----------------------------------------|------------------|------------------| | ||
| `clickandmortar/magento` | 2.4.7 | 8.3 | [Dockerfile](2.4.7/bookworm/Dockerfile) | `amd64`, `arm64` | `2.4.7-bookworm` | | ||
|
||
## Usage | ||
|
||
### Configuration | ||
|
||
The `MAGE_MODE` environment variable can be set to `developer`, `production` or `default` (default is `production`). | ||
|
||
If you need to override PHP or FPM configuration, you can mount custom configuration files: | ||
|
||
* `custom.ini` should be mounted at `/usr/local/etc/php/conf.d/99-custom.ini` | ||
* `www.conf` should be mounted over `/usr/local/etc/php-fpm.d/www.conf` | ||
|
||
### Docker Compose | ||
|
||
```yaml | ||
version: '3.7' | ||
services: | ||
magento: | ||
image: clickandmortar/magento:2.4.7-bookworm | ||
volumes: | ||
- ./:/app/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
date.timezone = Etc/UTC | ||
; Recommended value by Magento / Adobe Commerce | ||
memory_limit = 756M | ||
log_errors = On | ||
display_errors = Off | ||
display_startup_errors = Off | ||
expose_php = Off | ||
|
||
opcache.enable = 1 | ||
opcache.enable_cli = 1 | ||
opcache.save_comments = 1 | ||
opcache.memory_consumption = 1024 | ||
opcache.interned_strings_buffer = 32 | ||
opcache.max_accelerated_files = 130987 | ||
opcache.enable_file_override = 1 | ||
|
||
realpath_cache_size = 10M | ||
realpath_cache_ttl = 7200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[www] | ||
user = www-data | ||
group = www-data | ||
|
||
listen = 127.0.0.1:9000 | ||
|
||
pm = static | ||
; Or use an environment variable, such as ${PHP_FPM_MAX_CHILDREN} | ||
pm.max_children = 10 | ||
pm.status_path = /status | ||
; Useful to avoid memory leaks ; processes will be restarted after handling 10 requests | ||
pm.max_requests = 10 |