ci(config): update

This commit is contained in:
2025-10-22 11:04:47 +03:00
parent a437620a80
commit 3d36a33485
9 changed files with 175 additions and 166 deletions

View File

@@ -1,16 +1,17 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
RUN apt-get update && \
apt-get -y --no-install-recommends install \
git \
php8.2-gd \
php8.2-mysql \
php8.2-sqlite3 \
php8.2-pgsql \
nodejs && npm install -g npm@10.1.0 \
php8.4-gd \
php8.4-mysql \
php8.4-sqlite3 \
php8.4-pgsql \
nodejs && npm install -g npm@latest \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
ENV PATH=node_modules/.bin:$PATH

View File

@@ -15,7 +15,7 @@ stdout_logfile=/application/storage/logs/worker.log
stopwaitsecs=3600
[program:php-fpm]
command=php-fpm8.2 -F
command=php-fpm8.3 -F
process_name=%(program_name)s_%(process_num)02d
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

View File

@@ -2,29 +2,62 @@ upstream phpupstream {
server php-fpm:9000 fail_timeout=5s max_fails=5;
}
resolver 127.0.0.11 ipv6=off;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name dev2.eatvio.com;
server_name my-dev.eatvio.test; # change me
client_max_body_size 108M;
rewrite_log on;
# access_log /var/log/nginx/application.access.log;
access_log /dev/stdout;
error_log /dev/stdout info;
root /application/public;
index index.php;
# Vite HMR WebSocket and assets
# location /_vite {
# proxy_pass http://frontend:5173;
# proxy_http_version 1.1;
#
# # WebSocket support
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection $connection_upgrade;
#
# # Headers
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_set_header X-Forwarded-Host $host;
#
# # Timeouts
# proxy_connect_timeout 7d;
# proxy_send_timeout 7d;
# proxy_read_timeout 7d;
# }
# Production build assets
location /build {
try_files $uri $uri/ =404;
expires 1y;
add_header Cache-Control "public, immutable";
}
# try to serve file directly, fallback to index.php
location / {
try_files $uri /index.php$is_args$args;
}
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
location ~ \.php$ {
#resolver 127.0.0.11;
#set $upstream php-fpm:9000;
@@ -42,77 +75,7 @@ server {
server {
listen 80;
server_name socket.eatvio.com;
location / {
proxy_pass http://172.118.0.5:6001;
proxy_read_timeout 60;
proxy_connect_timeout 60;
proxy_redirect off;
# Allow the use of websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
error_log /dev/stdout info;
access_log /dev/stdout;
}
server {
listen 5000 ssl;
server_name alex.eatvio.local;
ssl_certificate /etc/nginx/alex.eatvio.local+4.pem;
ssl_certificate_key /etc/nginx/alex.eatvio.local+4-key.pem;
ssl_protocols TLSv1.2;
charset UTF-8;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
server_tokens off;
client_max_body_size 100M;
root /application/public;
index index.php;
# try to serve file directly, fallback to index.php
location / {
try_files $uri /index.php$is_args$args;
}
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
location ~ \.php$ {
fastcgi_pass phpupstream;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
include fastcgi_params;
}
}
server {
listen 5000 ssl;
server_name socket.alex.eatvio.local;
ssl_certificate /etc/nginx/socket.alex.eatvio.local+4.pem;
ssl_certificate_key /etc/nginx/socket.alex.eatvio.local+4-key.pem;
ssl_protocols TLSv1.2;
server_name ws-my-dev.eatvio.test; # change me
location / {
proxy_pass http://soketi:6001;
@@ -131,3 +94,4 @@ server {
error_log /dev/stdout info;
access_log /dev/stdout;
}

View File

@@ -1,21 +1,22 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
RUN curl -sL https://deb.nodesource.com/setup_24.x | bash -
RUN apt-get update && \
apt-get -y --no-install-recommends install \
git \
php8.2-gd \
php8.2-mysql \
php8.2-sqlite3 \
php8.2-intl \
php8.2-pgsql \
php8.2-imagick \
imagemagick php8.4-imagick \
php8.4-gd \
php8.4-mysql \
php8.4-sqlite3 \
php8.4-intl \
php8.4-memcached \
php8.4-pgsql \
php8.4-xdebug \
python3-pkg-resources supervisor ffmpeg jpegoptim \
php8.2-intl \
python3-pkg-resources supervisor \
nodejs && npm install -g npm@10.1.0 \
nodejs && npm install -g npm@latest \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
ENV PATH=node_modules/.bin:$PATH

View File

@@ -15,7 +15,7 @@ stdout_logfile=/application/storage/logs/worker.log
stopwaitsecs=3600
[program:php-fpm]
command=php-fpm8.2 -F
command=php-fpm8.3 -F
process_name=%(program_name)s_%(process_num)02d
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0

View File

@@ -1,9 +1,13 @@
FROM phpdockerio/php:8.2-fpm
FROM phpdockerio/php:8.4-fpm
WORKDIR "/application"
RUN apt-get update && \
apt-get -y --no-install-recommends install git \
php8.2-gd php8.2-mysql php8.2-sqlite3 php8.2-pgsql php8.2-imagick ffmpeg jpegoptim \
php8.4-gd php8.4-mysql php8.4-sqlite3 php8.4-pgsql ffmpeg jpegoptim \
php8.4-intl \
php8.4-memcached \
imagemagick php8.4-imagick \
python3-pkg-resources supervisor && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*