diff --git a/.gitea/workflows/docker-build-dev.yaml b/.gitea/workflows/docker-build-dev.yaml deleted file mode 100644 index 49f14fa..0000000 --- a/.gitea/workflows/docker-build-dev.yaml +++ /dev/null @@ -1,66 +0,0 @@ -name: "Build - Docker Image - RC" -run-name: ${{ gitea.actor }} is runs ci pipeline - -on: - push: - branches: - - dev - - schedule: - - cron: "0 1 * * *" - -concurrency: - group: docker-build-dev - cancel-in-progress: true - -jobs: - publish: - runs-on: ubuntu-latest - permissions: - packages: write - container: - image: catthehacker/ubuntu:act-latest - 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 }} - - - uses: docker/build-push-action@v6 - with: - context: . - push: true - labels: | - org.steelants.image.traffic.version=${{ env.release_version }} - tags: git.steelants.cz/steelants/docker_php_base:dev - - # ✅ 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: | - ✅ 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: | - ❌ Build failed! - Repo: ${{ github.repository }} - Branch: ${{ github.ref_name }} - Commit: ${{ github.sha }} - Version: ${{ env.release_version }} \ No newline at end of file diff --git a/.gitea/workflows/docker-build.yaml b/.gitea/workflows/docker-build.yaml index f90c93b..bdf40dc 100644 --- a/.gitea/workflows/docker-build.yaml +++ b/.gitea/workflows/docker-build.yaml @@ -33,10 +33,8 @@ jobs: - uses: docker/build-push-action@v6 with: - context: . + context: apache push: true - labels: | - org.steelants.image.traffic.version=${{ env.release_version }} tags: git.steelants.cz/steelants/docker_php_base:latest # ✅ Notifikace při úspěšném deploymentu @@ -46,7 +44,7 @@ jobs: with: webhook-url: ${{ secrets.WEBHOOK_URL }} content: | - ✅ Build successful! + ✅ APACHE - Build successful! Repo: ${{ github.repository }} Branch: ${{ github.ref_name }} Commit: ${{ github.sha }} @@ -59,7 +57,39 @@ jobs: with: webhook-url: ${{ secrets.WEBHOOK_URL }} content: | - ❌ Build failed! + ❌ APACHE - Build failed! + Repo: ${{ github.repository }} + Branch: ${{ github.ref_name }} + 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 }} diff --git a/Dockerfile b/apache/Dockerfile similarity index 100% rename from Dockerfile rename to apache/Dockerfile diff --git a/supervisor/conf.d/laravel-queues.conf b/apache/supervisor/conf.d/laravel-queues.conf similarity index 100% rename from supervisor/conf.d/laravel-queues.conf rename to apache/supervisor/conf.d/laravel-queues.conf diff --git a/supervisor/supervisord.conf b/apache/supervisor/supervisord.conf similarity index 100% rename from supervisor/supervisord.conf rename to apache/supervisor/supervisord.conf diff --git a/fmp-alpine/Dockerfile b/fmp-alpine/Dockerfile new file mode 100644 index 0000000..402c1cb --- /dev/null +++ b/fmp-alpine/Dockerfile @@ -0,0 +1,84 @@ +FROM php:8.4-fpm-alpine + +ENV TZ="Europe/Prague" \ + PHP_OPCACHE_ENABLE=1 \ + PHP_OPCACHE_VALIDATE_TIMESTAMPS=0 \ + PHP_OPCACHE_REVALIDATE_FREQ=0 \ + PHP_OPCACHE_MEMORY_CONSUMPTION=192 \ + PHP_OPCACHE_MAX_ACCELERATED_FILES=20000 \ + PHP_OPCACHE_MAX_WASTED_PERCENTAGE=10 \ + PHP_OPCACHE_INTERNED_STRINGS_BUFFER=16 \ + APP_ENV=production \ + APP_DEBUG=false + +RUN apk add --no-cache \ + tzdata \ + bash \ + ca-certificates \ + libpq \ + libzip \ + imagemagick \ + imagemagick-dev \ + librsvg \ + freetype \ + libjpeg-turbo \ + libpng \ + icu \ + oniguruma \ + libxml2 + +RUN apk add --no-cache --virtual .build-deps \ + $PHPIZE_DEPS \ + postgresql-dev \ + libzip-dev \ + freetype-dev \ + libjpeg-turbo-dev \ + libpng-dev \ + icu-dev \ + libxml2-dev \ + linux-headers + +RUN docker-php-ext-configure gd \ + --with-freetype \ + --with-jpeg \ + && docker-php-ext-install -j$(nproc) \ + pdo_mysql \ + pdo_pgsql \ + pgsql \ + zip \ + bcmath \ + soap \ + gd \ + intl \ + opcache \ + sockets \ + pcntl + +RUN pecl install imagick \ + && docker-php-ext-enable imagick + +RUN apk del .build-deps + +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" + +RUN { \ + echo "memory_limit=256M"; \ + echo "upload_max_filesize=100M"; \ + echo "post_max_size=100M"; \ + echo "realpath_cache_size=4096K"; \ + echo "realpath_cache_ttl=600"; \ +} > "$PHP_INI_DIR/conf.d/99-laravel.ini" + +RUN { \ + echo "[opcache]"; \ + echo "opcache.enable=${PHP_OPCACHE_ENABLE}"; \ + echo "opcache.enable_cli=0"; \ + echo "opcache.validate_timestamps=${PHP_OPCACHE_VALIDATE_TIMESTAMPS}"; \ + echo "opcache.revalidate_freq=${PHP_OPCACHE_REVALIDATE_FREQ}"; \ + echo "opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}"; \ + echo "opcache.interned_strings_buffer=${PHP_OPCACHE_INTERNED_STRINGS_BUFFER}"; \ + echo "opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}"; \ + echo "opcache.max_wasted_percentage=${PHP_OPCACHE_MAX_WASTED_PERCENTAGE}"; \ + echo "opcache.save_comments=1"; \ +} > "$PHP_INI_DIR/conf.d/10-opcache.ini" \ No newline at end of file