Compare commits
15
Commits
0.0.0-rc.14
...
0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e4c781ce2 | ||
|
|
4706600cb0 | ||
|
|
24381ef43f | ||
|
|
16bd695890 | ||
|
|
7461f0a25e | ||
|
|
305aa9c83d | ||
|
|
a9e3ace717 | ||
|
|
85ed62b401 | ||
|
|
34cc835f1c | ||
|
|
c498df805c | ||
|
|
b6f8151bd4 | ||
|
|
189dc975bd | ||
|
|
33f9ca082a | ||
|
|
5cef6189ba | ||
|
|
3939dfbea4 |
@@ -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 }}
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ RUN --mount=type=cache,target=/var/cache/apt \
|
|||||||
libzip-dev \
|
libzip-dev \
|
||||||
zip \
|
zip \
|
||||||
unzip \
|
unzip \
|
||||||
|
zlib1g-dev \
|
||||||
|
libicu-dev \
|
||||||
|
g++ \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
npm \
|
||||||
cron \
|
cron \
|
||||||
@@ -51,9 +54,28 @@ RUN --mount=type=cache,target=/var/cache/apt \
|
|||||||
# Enable Apache mod_rewrite for URL rewriting
|
# Enable Apache mod_rewrite for URL rewriting
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
|
RUN docker-php-ext-configure intl
|
||||||
|
|
||||||
# Install PHP extensions
|
# Install PHP extensions
|
||||||
RUN docker-php-ext-install pdo_mysql pgsql pdo_pgsql zip opcache pcntl sockets
|
RUN docker-php-ext-configure \
|
||||||
RUN docker-php-ext-enable imagick
|
opcache --enable-opcache
|
||||||
|
|
||||||
|
RUN docker-php-ext-install \
|
||||||
|
pdo_mysql \
|
||||||
|
pgsql \
|
||||||
|
pdo_pgsql \
|
||||||
|
zip \
|
||||||
|
opcache \
|
||||||
|
pcntl \
|
||||||
|
sockets\
|
||||||
|
bcmath \
|
||||||
|
soap \
|
||||||
|
gd \
|
||||||
|
intl
|
||||||
|
|
||||||
|
RUN docker-php-ext-enable \
|
||||||
|
imagick \
|
||||||
|
opcache
|
||||||
|
|
||||||
# PHP
|
# PHP
|
||||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
||||||
@@ -63,7 +85,7 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_FILE" && \
|
|||||||
printf '[Date]\ndate.timezone="%s"\n', $TZ > "$PHP_INI_DIR/conf.d/tzone.ini"
|
printf '[Date]\ndate.timezone="%s"\n', $TZ > "$PHP_INI_DIR/conf.d/tzone.ini"
|
||||||
|
|
||||||
#OPCACHE
|
#OPCACHE
|
||||||
RUN echo '\n\
|
RUN echo "\n\
|
||||||
[opcache]\n\
|
[opcache]\n\
|
||||||
opcache.enable=1\n\
|
opcache.enable=1\n\
|
||||||
opcache.revalidate_freq=0\n\
|
opcache.revalidate_freq=0\n\
|
||||||
@@ -72,11 +94,12 @@ opcache.max_accelerated_files=${PHP_OPCACHE_MAX_ACCELERATED_FILES}\n\
|
|||||||
opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}\n\
|
opcache.memory_consumption=${PHP_OPCACHE_MEMORY_CONSUMPTION}\n\
|
||||||
opcache.max_wasted_percentage=${PHP_OPCACHE_MAX_WASTED_PERCENTAGE}\n\
|
opcache.max_wasted_percentage=${PHP_OPCACHE_MAX_WASTED_PERCENTAGE}\n\
|
||||||
opcache.interned_strings_buffer=16\n\
|
opcache.interned_strings_buffer=16\n\
|
||||||
opcache.fast_shutdown=1' >> "$PHP_INI_DIR/conf.d/opcache.ini"
|
opcache.fast_shutdown=1" >> "$PHP_INI_DIR/conf.d/opcache.ini"
|
||||||
|
|
||||||
#SUPERVISORD
|
#SUPERVISORD
|
||||||
RUN mkdir -p /var/log/supervisor
|
RUN mkdir -p /var/log/supervisor
|
||||||
COPY supervisor/ /etc/supervisor/
|
COPY ./supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
COPY ./supervisor/conf.d/laravel-queues.conf /etc/supervisor/conf.d/laravel-queues.conf
|
||||||
|
|
||||||
# Setup Crone
|
# Setup Crone
|
||||||
RUN mkdir -p /var/log/cron && \
|
RUN mkdir -p /var/log/cron && \
|
||||||
+3
-3
@@ -1,19 +1,19 @@
|
|||||||
[program:queue-default]
|
[program:queue-default]
|
||||||
command=/usr/local/bin/php /var/www/html/artisan queue:work --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 /var/www/html/artisan queue:work --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 /var/www/html/artisan queue:work --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
|
||||||
@@ -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 \
|
||||||
|
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