Refactor Docker setup: move Dockerfiles to respective directories and add supervisor configurations
Build - Docker Image - PROD / publish (push) Has been cancelled

This commit is contained in:
Jonatan Rek
2026-01-28 10:40:10 +01:00
parent 33f9ca082a
commit 189dc975bd
5 changed files with 116 additions and 3 deletions
+33 -3
View File
@@ -33,10 +33,8 @@ jobs:
- uses: docker/build-push-action@v6 - uses: docker/build-push-action@v6
with: with:
context: . context: ./apache/
push: true push: true
labels: |
org.steelants.image.traffic.version=${{ env.release_version }}
tags: git.steelants.cz/steelants/docker_php_base:latest tags: git.steelants.cz/steelants/docker_php_base:latest
# ✅ Notifikace při úspěšném deploymentu # ✅ Notifikace při úspěšném deploymentu
@@ -64,3 +62,35 @@ jobs:
Branch: ${{ github.ref_name }} Branch: ${{ github.ref_name }}
Commit: ${{ github.sha }} Commit: ${{ github.sha }}
Version: ${{ env.release_version }} 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: |
✅ 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 }}
View File
+83
View File
@@ -0,0 +1,83 @@
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
RUN docker-php-ext-configure gd \
--with-freetype \
--with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_mysql \
pdo_pgsql \
pgsql \
zip \
bcmath \
soap \
sockets \
pcntl \
gd \
intl \
opcache
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"