Merge branch 'main' of https://git.steelants.cz/JonatanRek/DOCKER_PHP_BASE
Build - Docker Image - PROD / publish (push) Successful in 11m35s
Build - Docker Image - PROD / publish (push) Successful in 11m35s
This commit is contained in:
@@ -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 }}
|
|
||||||
@@ -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
|
||||||
@@ -46,7 +44,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
content: |
|
content: |
|
||||||
✅ Build successful!
|
✅ APACHE - Build successful!
|
||||||
Repo: ${{ github.repository }}
|
Repo: ${{ github.repository }}
|
||||||
Branch: ${{ github.ref_name }}
|
Branch: ${{ github.ref_name }}
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
@@ -59,7 +57,39 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
webhook-url: ${{ secrets.WEBHOOK_URL }}
|
||||||
content: |
|
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 }}
|
Repo: ${{ github.repository }}
|
||||||
Branch: ${{ github.ref_name }}
|
Branch: ${{ github.ref_name }}
|
||||||
Commit: ${{ github.sha }}
|
Commit: ${{ github.sha }}
|
||||||
|
|||||||
@@ -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"
|
||||||
Reference in New Issue
Block a user