6 Commits
Author SHA1 Message Date
VS 302a79047d Fix Arch
Build - Docker Image - PROD / build-apache-amd64 (push) Successful in 7m53s
Build - Docker Image - PROD / build-apache-arm64 (push) Successful in 10m29s
Build - Docker Image - PROD / manifest-apache (push) Successful in 9s
2026-11-30 16:21:28 +01:00
VS 7a8aed53ab Fixes
Build - Docker Image - PROD / build-apache-amd64 (push) Canceled after 2m1s
Build - Docker Image - PROD / build-apache-arm64 (push) Canceled after 0s
Build - Docker Image - PROD / manifest-apache (push) Canceled after 0s
2026-11-30 16:19:06 +01:00
VS b95a8f1b8e Fix PG Backups
Build - Docker Image - PROD / build-apache-arm64 (push) Canceled after 16s
Build - Docker Image - PROD / manifest-apache (push) Canceled after 0s
Build - Docker Image - PROD / build-apache-amd64 (push) Canceled after 4m52s
2026-11-30 15:52:22 +01:00
Jonatan Rek 81ca061966 Git ignore
Build - Docker Image - PROD / build-apache-amd64 (push) Successful in 9m32s
Build - Docker Image - PROD / build-apache-arm64 (push) Successful in 11m4s
Build - Docker Image - PROD / manifest-apache (push) Successful in 7s
2026-10-31 19:51:31 +01:00
Jonatan Rek cd8c9130bb Revert "Fix"
Build - Docker Image - PROD / build-apache-arm64 (push) Canceled after 0s
Build - Docker Image - PROD / manifest-apache (push) Canceled after 0s
Build - Docker Image - PROD / build-apache-amd64 (push) Canceled after 1m25s
This reverts commit 6ebb259757.
2026-10-31 19:49:01 +01:00
Jonatan Rek c48f30b474 Revert "Progress"
This reverts commit 085ab7e9b8.
2026-10-31 19:49:01 +01:00
8 changed files with 34 additions and 102 deletions

No files matched your search

+15 -5
View File
@@ -20,7 +20,7 @@ jobs:
# ─── APACHE ─────────────────────────────────────────────────────────────── # ─── APACHE ───────────────────────────────────────────────────────────────
build-apache-amd64: build-apache-amd64:
runs-on: ubuntu-latest runs-on: ubuntu-latest-amd64
permissions: permissions:
contents: read contents: read
packages: write packages: write
@@ -62,6 +62,7 @@ jobs:
password: ${{ secrets.GITEAPASSWD }} password: ${{ secrets.GITEAPASSWD }}
- id: build - id: build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
continue-on-error: true
with: with:
context: apache context: apache
platforms: linux/arm64 platforms: linux/arm64
@@ -69,6 +70,7 @@ jobs:
manifest-apache: manifest-apache:
needs: [build-apache-amd64, build-apache-arm64] needs: [build-apache-amd64, build-apache-arm64]
if: ${{ always() && needs.build-apache-amd64.result == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
@@ -86,10 +88,18 @@ jobs:
username: ${{ secrets.GITEAUSER }} username: ${{ secrets.GITEAUSER }}
password: ${{ secrets.GITEAPASSWD }} password: ${{ secrets.GITEAPASSWD }}
- name: Create and push multi-arch manifest - name: Create and push multi-arch manifest
env:
AMD64_DIGEST: ${{ needs.build-apache-amd64.outputs.digest }}
ARM64_DIGEST: ${{ needs.build-apache-arm64.outputs.digest }}
run: | run: |
docker buildx imagetools create -t git.steelants.cz/steelants/docker_php_base:latest \ IMAGE=git.steelants.cz/steelants/docker_php_base
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-amd64.outputs.digest }} \ SOURCES="$IMAGE@$AMD64_DIGEST"
git.steelants.cz/steelants/docker_php_base@${{ needs.build-apache-arm64.outputs.digest }} if [ -n "$ARM64_DIGEST" ]; then
SOURCES="$SOURCES $IMAGE@$ARM64_DIGEST"
else
echo "::warning::arm64 build failed - publishing amd64 only"
fi
docker buildx imagetools create -t $IMAGE:latest $SOURCES
- name: Discord Webhook Success - name: Discord Webhook Success
if: success() if: success()
@@ -97,7 +107,7 @@ jobs:
with: with:
webhook-url: ${{ secrets.WEBHOOK_URL }} webhook-url: ${{ secrets.WEBHOOK_URL }}
content: | content: |
✅ APACHE - Build successful! (amd64 + arm64) ✅ APACHE - Build successful! (amd64${{ needs.build-apache-arm64.outputs.digest != '' && ' + arm64' || ' only, arm64 FAILED' }})
Repo: ${{ github.repository }} Repo: ${{ github.repository }}
Branch: ${{ github.ref_name }} Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }} Commit: ${{ github.sha }}
+3 -1
View File
@@ -1 +1,3 @@
.megamemory/* .megamemory/knowledge.db
.megamemory/knowledge.db-shm
.megamemory/knowledge.db-wal
+11 -6
View File
@@ -1,12 +1,9 @@
# 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="${APP_ROOT}/public" \ APACHE_DOCUMENT_ROOT="/var/www/html/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" \
@@ -17,6 +14,14 @@ ENV TZ="Europe/Prague" \
# Timezone # Timezone
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Register PostgreSQL (PGDG) APT repository
RUN install -d /usr/share/postgresql-common/pgdg && \
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail \
https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
. /etc/os-release && \
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" \
> /etc/apt/sources.list.d/pgdg.list
# Install Additional System Dependencies # Install Additional System Dependencies
RUN rm -f /etc/apt/apt.conf.d/docker-clean RUN rm -f /etc/apt/apt.conf.d/docker-clean
RUN --mount=type=cache,target=/var/cache/apt \ RUN --mount=type=cache,target=/var/cache/apt \
@@ -38,7 +43,7 @@ RUN --mount=type=cache,target=/var/cache/apt \
cron \ cron \
nano \ nano \
default-mysql-client \ default-mysql-client \
postgresql-client \ postgresql-client-19 \
imagemagick \ imagemagick \
libmagickwand-dev \ libmagickwand-dev \
librsvg2-2 \ librsvg2-2 \
@@ -117,7 +122,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 ${APP_ROOT} && /usr/local/bin/php artisan schedule:run >> /dev/null 2>&1" >> /etc/crontab echo "* * * * * www-data cd /var/www/html && /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 %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=default,importstatistics command=/usr/local/bin/php /var/www/html/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 %(ENV_APP_ROOT)s/artisan queue:work --sleep=5 --tries=3 --queue=statistics command=/usr/local/bin/php /var/www/html/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 %(ENV_APP_ROOT)s/artisan queue:work --sleep=3 --tries=3 --queue=detections command=/usr/local/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=3 --queue=detections
user=www-data user=www-data
autostart=true autostart=true
autorestart=true autorestart=true
+2 -44
View File
@@ -1,12 +1,6 @@
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 \
@@ -31,17 +25,7 @@ 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 \
@@ -49,14 +33,13 @@ 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 --with-webp \ gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \ && docker-php-ext-install -j$(nproc) \
pdo_mysql \ pdo_mysql \
pdo_pgsql \ pdo_pgsql \
@@ -76,13 +59,6 @@ RUN pecl install 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"
@@ -106,21 +82,3 @@ RUN { \
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
@@ -1,17 +0,0 @@
#!/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 "$@"
@@ -1,20 +0,0 @@
[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
@@ -1,6 +0,0 @@
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/run/supervisord.pid
[include]
files = /etc/supervisor/conf.d/*.conf