Compare commits

...

5 Commits

Author SHA1 Message Date
ddadmin 180b2da20d Merge pull request 'move-php' (#4) from move-php into main
Reviewed-on: #4
2025-01-16 18:23:32 +03:00
Sergey Paramoshkin 983c886cc8 fix files 2025-01-16 17:57:18 +03:00
ddadmin 9ad05be425 Update Dockerfile 2025-01-16 17:53:51 +03:00
ddadmin a83662d4a4 Update Dockerfile 2025-01-16 17:47:39 +03:00
Sergey Paramoshkin 375f72c20f move to fpm 2025-01-14 09:52:53 +03:00
3 changed files with 27 additions and 9 deletions

View File

@ -24,6 +24,7 @@ RUN apt update && apt install -y \
libonig-dev \ libonig-dev \
libxslt1-dev \ libxslt1-dev \
acl \ acl \
nginx \
&& echo 'alias sf="php bin/console"' >> ~/.bashrc && echo 'alias sf="php bin/console"' >> ~/.bashrc
RUN wget -q -O /etc/apt/trusted.gpg.d/lab50.gpg http://packages.lab50.net/lab50.gpg RUN wget -q -O /etc/apt/trusted.gpg.d/lab50.gpg http://packages.lab50.net/lab50.gpg
@ -63,17 +64,19 @@ WORKDIR /usr/src/signer/
COPY ./backend /usr/src/signer COPY ./backend /usr/src/signer
COPY ./docker/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf COPY ./docker/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf
COPY ./docker/nginx/default.conf /etc/nginx/sites-enabled/default
RUN curl curl https://frankenphp.dev/install.sh | sh COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
RUN mv /usr/src/signer/frankenphp /usr/local/bin/ RUN mkdir -p /run/php
# RUN curl curl https://frankenphp.dev/install.sh | sh
# RUN mv /usr/src/signer/frankenphp /usr/local/bin/
ENV COMPOSER_ALLOW_SUPERUSER=1 ENV COMPOSER_ALLOW_SUPERUSER=1
RUN composer install RUN composer install
RUN service php8.3-fpm start # RUN service php8.3-fpm start
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ] ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["php-fpm8.3", "-F"] # CMD ["php-fpm8.3", "-F", "nginx", "-g 'daemon off'"]
EXPOSE 9000 EXPOSE 9000

View File

@ -1,6 +1,21 @@
server { server {
server_name _; server_name _;
listen *:80; listen *:80;
index index.php index.html index.htm;
root /usr/src/signer/public;
root /application/public;
location ~* \.php$ {
try_files $uri $uri/ /index.php last;
fastcgi_split_path_info (.+?\.php)(/.*)$;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~* .php/ {
rewrite (.*.php)/ $1 last;
}
} }

View File

@ -1,9 +1,10 @@
user www-data; user www-data;
worker_processes 4; worker_processes 4;
daemon off;
pid /run/nginx.pid; pid /run/nginx.pid;
events { events {
worker_connections 2048; worker_connections 2048;
multi_accept on; multi_accept on;
use epoll; use epoll;
} }
@ -34,4 +35,3 @@ http {
fastcgi_buffer_size 32k; fastcgi_buffer_size 32k;
} }
daemon off;