11 Commits
Author SHA1 Message Date
Jonatan Rek 085ab7e9b8 Progress
Build - Docker Image - PROD / build-apache-amd64 (push) Successful in 1h17m32s
Build - Docker Image - PROD / build-apache-arm64 (push) Canceled after 3m43s
Build - Docker Image - PROD / manifest-apache (push) Canceled after 0s
2026-10-31 18:29:05 +01:00
Jonatan Rek 6ebb259757 Fix
Build - Docker Image - PROD / build-apache-amd64 (push) Failing after 14m9s
Build - Docker Image - PROD / build-apache-arm64 (push) Successful in 10m48s
Build - Docker Image - PROD / manifest-apache (push) Skipped
2026-10-24 20:35:19 +02:00
Jonatan Rek f8103a0450 Fixes
Build - Docker Image - PROD / build-apache-arm64 (push) Canceled after 49s
Build - Docker Image - PROD / build-apache-amd64 (push) Canceled after 50s
Build - Docker Image - PROD / manifest-apache (push) Canceled after 0s
2026-10-24 20:34:29 +02:00
Jonatan Rek 83b31d5c37 Fix
Build - Docker Image - PROD / build-apache-amd64 (push) Successful in 10m32s
Build - Docker Image - PROD / build-apache-arm64 (push) Successful in 10m33s
Build - Docker Image - PROD / manifest-apache (push) Successful in 29s
2026-09-19 12:13:31 +02:00
Jonatan Rek 2ab9a9c1d5 Fix Image jpeg support for imagick
Build - Docker Image - PROD / build-apache-amd64 (push) Failing after 46s
Build - Docker Image - PROD / build-apache-arm64 (push) Failing after 38s
Build - Docker Image - PROD / manifest-apache (push) Skipped
2026-08-24 20:54:08 +02:00
Jonatan Rek fdb2ce8155 FIx
Build - Docker Image - PROD / build-apache-amd64 (push) Successful in 8m0s
Build - Docker Image - PROD / build-apache-arm64 (push) Successful in 11m33s
Build - Docker Image - PROD / manifest-apache (push) Successful in 28s
2026-02-22 16:33:58 +01:00
JonatanRek 39f26ae755 Update README.md
Build - Docker Image - PROD / publish (push) Successful in 13m37s
2026-02-17 19:07:40 +00:00
JonatanRek bc7dd69990 Update README.md
Build - Docker Image - PROD / publish (push) Has been cancelled
2026-02-17 19:07:30 +00:00
patrik d0440712b5 Update fmp-alpine/Dockerfile
Build - Docker Image - PROD / publish (push) Successful in 13m53s
2026-02-17 18:36:41 +00:00
patrik 4db9a0f224 Update fmp-alpine/Dockerfile
Build - Docker Image - PROD / publish (push) Has been cancelled
2026-02-17 18:34:33 +00:00
patrik 88f12b18bc Readme
Build - Docker Image - PROD / publish (push) Successful in 12m57s
2026-02-17 18:27:35 +01:00
9 changed files with 178 additions and 55 deletions

No files matched your search

+63 -45
View File
@@ -5,52 +5,103 @@ on:
push: push:
branches: branches:
- main - main
schedule: schedule:
- cron: "0 1 * * *" - cron: "0 1 * * *"
workflow_dispatch:
concurrency: concurrency:
group: docker-build-prod group: docker-build-prod
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
publish:
# ─── APACHE ───────────────────────────────────────────────────────────────
build-apache-amd64:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read
packages: write packages: write
container: container:
image: catthehacker/ubuntu:act-latest image: catthehacker/ubuntu:act-latest
outputs:
digest: ${{ steps.build.outputs.digest }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1 - uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v3 - uses: docker/login-action@v3
with: with:
registry: git.steelants.cz registry: git.steelants.cz
username: ${{ secrets.GITEAUSER }} username: ${{ secrets.GITEAUSER }}
password: ${{ secrets.GITEAPASSWD }} password: ${{ secrets.GITEAPASSWD }}
- id: build
- uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: apache context: apache
push: true platforms: linux/amd64
tags: git.steelants.cz/steelants/docker_php_base:latest outputs: type=image,name=git.steelants.cz/steelants/docker_php_base,push-by-digest=true,name-canonical=true,push=true
build-apache-arm64:
runs-on: ubuntu-latest-arm
permissions:
contents: read
packages: write
container:
image: catthehacker/ubuntu:act-latest
outputs:
digest: ${{ steps.build.outputs.digest }}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v3
with:
registry: git.steelants.cz
username: ${{ secrets.GITEAUSER }}
password: ${{ secrets.GITEAPASSWD }}
- id: build
uses: docker/build-push-action@v6
with:
context: apache
platforms: linux/arm64
outputs: type=image,name=git.steelants.cz/steelants/docker_php_base,push-by-digest=true,name-canonical=true,push=true
manifest-apache:
needs: [build-apache-amd64, build-apache-arm64]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: docker/setup-buildx-action@v1
with:
driver: docker
- uses: docker/login-action@v3
with:
registry: git.steelants.cz
username: ${{ secrets.GITEAUSER }}
password: ${{ secrets.GITEAPASSWD }}
- name: Create and push multi-arch manifest
run: |
docker buildx imagetools create -t git.steelants.cz/steelants/docker_php_base:latest \
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-amd64.outputs.digest }} \
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-arm64.outputs.digest }}
# ✅ Notifikace při úspěšném deploymentu
- name: Discord Webhook Success - name: Discord Webhook Success
if: success() if: success()
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v6.0.0
with: with:
webhook-url: ${{ secrets.WEBHOOK_URL }} webhook-url: ${{ secrets.WEBHOOK_URL }}
content: | content: |
✅ APACHE - Build successful! ✅ APACHE - Build successful! (amd64 + arm64)
Repo: ${{ github.repository }} Repo: ${{ github.repository }}
Branch: ${{ github.ref_name }} Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }} Commit: ${{ github.sha }}
Version: ${{ env.release_version }}
# ❌ Notifikace při neúspěšném deploymentu
- name: Discord Webhook Failure - name: Discord Webhook Failure
if: failure() if: failure()
uses: tsickert/discord-webhook@v6.0.0 uses: tsickert/discord-webhook@v6.0.0
@@ -61,36 +112,3 @@ jobs:
Repo: ${{ github.repository }} Repo: ${{ github.repository }}
Branch: ${{ github.ref_name }} Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }} Commit: ${{ github.sha }}
Version: ${{ env.release_version }}
- uses: docker/build-push-action@v6
with:
context: fmp-alpine
push: true
tags: git.steelants.cz/steelants/docker_php_base:fpm-alpine-latest
# ✅ Notifikace při úspěšném deploymentu
- name: Discord Webhook Success
if: success()
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
content: |
✅ FMP - ALPINE - Build successful!
Repo: ${{ github.repository }}
Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }}
Version: ${{ env.release_version }}
# ❌ Notifikace při neúspěšném deploymentu
- name: Discord Webhook Failure
if: failure()
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
content: |
❌ FMP - ALPINE - Build failed!
Repo: ${{ github.repository }}
Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }}
Version: ${{ env.release_version }}
+1
View File
@@ -0,0 +1 @@
.megamemory/*
+4
View File
@@ -0,0 +1,4 @@
```bash
docker build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t git.steelants.cz/steelants/docker_php_base:latest ./apache
docker push git.steelants.cz/steelants/docker_php_base:latest
```
+17 -3
View File
@@ -1,9 +1,12 @@
# Use PHP with Apache as the base image # Use PHP with Apache as the base image
FROM php:8.4-apache FROM php:8.4-apache
# Application root (default keeps the original /var/www/html layout)
ENV APP_ROOT="/var/www/html"
# Environment # Environment
ENV TZ="Europe/Prague" \ ENV TZ="Europe/Prague" \
APACHE_DOCUMENT_ROOT="/var/www/html/public" \ APACHE_DOCUMENT_ROOT="${APP_ROOT}/public" \
PHP_INI_FILE="$PHP_INI_DIR/php.ini" \ PHP_INI_FILE="$PHP_INI_DIR/php.ini" \
PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \ PHP_OPCACHE_VALIDATE_TIMESTAMPS="1" \
PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \ PHP_OPCACHE_MAX_ACCELERATED_FILES="10000" \
@@ -25,6 +28,10 @@ RUN --mount=type=cache,target=/var/cache/apt \
unzip \ unzip \
zlib1g-dev \ zlib1g-dev \
libicu-dev \ libicu-dev \
libjpeg-dev \
libpng-dev \
libwebp-dev \
libfreetype6-dev \
g++ \ g++ \
nodejs \ nodejs \
npm \ npm \
@@ -56,6 +63,8 @@ RUN a2enmod rewrite
RUN docker-php-ext-configure intl RUN docker-php-ext-configure intl
RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp
# Install PHP extensions # Install PHP extensions
RUN docker-php-ext-configure \ RUN docker-php-ext-configure \
opcache --enable-opcache opcache --enable-opcache
@@ -71,12 +80,17 @@ RUN docker-php-ext-install \
bcmath \ bcmath \
soap \ soap \
gd \ gd \
intl intl \
calendar
RUN docker-php-ext-enable \ RUN docker-php-ext-enable \
imagick \ imagick \
opcache opcache
# Fail fast if the JPEG delegate did not make it into the image
RUN php -r 'if (!in_array("JPEG", Imagick::queryFormats())) { fwrite(STDERR, "ERROR: imagick built without JPEG delegate\n"); exit(1); } echo "imagick JPEG delegate OK\n";' && \
php -r 'if (!function_exists("imagecreatefromjpeg")) { fwrite(STDERR, "ERROR: gd built without JPEG support\n"); exit(1); } echo "gd JPEG OK\n";'
# PHP # PHP
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \ sed -i "s|memory_limit = 128M|memory_limit = 256M |g" "$PHP_INI_FILE" && \
@@ -103,7 +117,7 @@ COPY ./supervisor/conf.d/laravel-queues.conf /etc/supervisor/conf.d/laravel-queu
# Setup Crone # Setup Crone
RUN mkdir -p /var/log/cron && \ RUN mkdir -p /var/log/cron && \
echo "* * * * * www-data cd /var/www/html && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1" >> /etc/crontab echo "* * * * * www-data cd ${APP_ROOT} && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1" >> /etc/crontab
# Install composer # bun # Install composer # bun
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
+3 -3
View File
@@ -1,19 +1,19 @@
[program:queue-default] [program:queue-default]
command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3 --queue=default,importstatistics command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=default,importstatistics
user=www-data user=www-data
autostart=true autostart=true
autorestart=true autorestart=true
stdout_logfile=/var/log/supervisor/queue-default.log stdout_logfile=/var/log/supervisor/queue-default.log
[program:queue-statistics] [program:queue-statistics]
command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=5 --tries=3 --queue=statistics command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=5 --tries=3 --queue=statistics
user=www-data user=www-data
autostart=true autostart=true
autorestart=true autorestart=true
stdout_logfile=/var/log/supervisor/queue-statistics.log stdout_logfile=/var/log/supervisor/queue-statistics.log
[program:queue-detections] [program:queue-detections]
command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3 --queue=detections command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=detections
user=www-data user=www-data
autostart=true autostart=true
autorestart=true autorestart=true
+47 -4
View File
@@ -1,6 +1,12 @@
FROM php:8.4-fpm-alpine FROM php:8.4-fpm-alpine
# Application root (same default as the apache image)
ENV APP_ROOT="/var/www/html"
ENV TZ="Europe/Prague" \ ENV TZ="Europe/Prague" \
ENABLE_CRON=0 \
ENABLE_SUPERVISOR=0 \
COMPOSER_ALLOW_SUPERUSER=1 \
PHP_OPCACHE_ENABLE=1 \ PHP_OPCACHE_ENABLE=1 \
PHP_OPCACHE_VALIDATE_TIMESTAMPS=0 \ PHP_OPCACHE_VALIDATE_TIMESTAMPS=0 \
PHP_OPCACHE_REVALIDATE_FREQ=0 \ PHP_OPCACHE_REVALIDATE_FREQ=0 \
@@ -25,7 +31,17 @@ RUN apk add --no-cache \
libpng \ libpng \
icu \ icu \
oniguruma \ oniguruma \
libxml2 libxml2 \
libwebp \
git \
nano \
zip \
unzip \
nodejs \
npm \
supervisor \
mysql-client \
postgresql-client
RUN apk add --no-cache --virtual .build-deps \ RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \ $PHPIZE_DEPS \
@@ -33,13 +49,14 @@ RUN apk add --no-cache --virtual .build-deps \
libzip-dev \ libzip-dev \
freetype-dev \ freetype-dev \
libjpeg-turbo-dev \ libjpeg-turbo-dev \
libwebp-dev \
libpng-dev \ libpng-dev \
icu-dev \ icu-dev \
libxml2-dev \ libxml2-dev \
linux-headers linux-headers
RUN docker-php-ext-configure \ RUN docker-php-ext-configure \
gd --with-freetype --with-jpeg \ gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install -j$(nproc) \ && docker-php-ext-install -j$(nproc) \
pdo_mysql \ pdo_mysql \
pdo_pgsql \ pdo_pgsql \
@@ -51,13 +68,21 @@ RUN docker-php-ext-configure \
intl \ intl \
opcache \ opcache \
sockets \ sockets \
pcntl pcntl \
calendar
RUN pecl install imagick \ RUN pecl install imagick \
&& docker-php-ext-enable imagick && docker-php-ext-enable imagick
RUN apk del .build-deps RUN apk del .build-deps
# Fail fast if the JPEG delegate did not make it into the image
RUN php -r 'if (!in_array("JPEG", Imagick::queryFormats())) { fwrite(STDERR, "ERROR: imagick built without JPEG delegate\n"); exit(1); } echo "imagick JPEG delegate OK\n";' && \
php -r 'if (!function_exists("imagecreatefromjpeg")) { fwrite(STDERR, "ERROR: gd built without JPEG support\n"); exit(1); } echo "gd JPEG OK\n";'
# Composer
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" \
&& echo "date.timezone=${TZ}" > "$PHP_INI_DIR/conf.d/99-timezone.ini" && echo "date.timezone=${TZ}" > "$PHP_INI_DIR/conf.d/99-timezone.ini"
@@ -80,4 +105,22 @@ RUN { \
echo "opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}"; \ echo "opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}"; \
echo "opcache.max_wasted_percentage=${PHP_OPCACHE_MAX_WASTED_PERCENTAGE}"; \ echo "opcache.max_wasted_percentage=${PHP_OPCACHE_MAX_WASTED_PERCENTAGE}"; \
echo "opcache.save_comments=1"; \ echo "opcache.save_comments=1"; \
} > "$PHP_INI_DIR/conf.d/10-opcache.ini" } > "$PHP_INI_DIR/conf.d/10-opcache.ini"
# Supervisor (queue workers, started when ENABLE_SUPERVISOR=1)
RUN mkdir -p /var/log/supervisor
COPY ./supervisor/supervisord.conf /etc/supervisor/supervisord.conf
COPY ./supervisor/conf.d/laravel-queues.conf /etc/supervisor/conf.d/laravel-queues.conf
# Cron (Laravel scheduler, started when ENABLE_CRON=1)
RUN mkdir -p /var/log/cron && \
echo "* * * * * cd ${APP_ROOT} && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1" > /etc/crontabs/www-data
# Entrypoint
COPY ./docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
WORKDIR ${APP_ROOT}
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["php-fpm"]
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -e
# Optional background services, only started together with php-fpm so that
# one-off commands (php artisan ..., composer ...) are passed through untouched.
case "$1" in
php-fpm*)
if [ "${ENABLE_CRON:-0}" = "1" ]; then
crond -b -L /var/log/cron/cron.log
fi
if [ "${ENABLE_SUPERVISOR:-0}" = "1" ]; then
supervisord -c /etc/supervisor/supervisord.conf
fi
;;
esac
exec docker-php-entrypoint "$@"
@@ -0,0 +1,20 @@
[program:queue-default]
command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=default,importstatistics
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/queue-default.log
[program:queue-statistics]
command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=5 --tries=3 --queue=statistics
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/queue-statistics.log
[program:queue-detections]
command=/usr/local/bin/php %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=detections
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/queue-detections.log
+6
View File
@@ -0,0 +1,6 @@
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/run/supervisord.pid
[include]
files = /etc/supervisor/conf.d/*.conf