Compare commits

...

7 Commits

Author SHA1 Message Date
dcherednik bbe7d1b7fe Merge branch 'master' into DD-3602 2025-03-10 14:23:05 +03:00
cherednik ab1562212f fix Signer 2025-02-06 17:08:38 +04:00
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
4 changed files with 106 additions and 9 deletions

View File

@ -24,6 +24,7 @@ RUN apt update && apt install -y \
libonig-dev \
libxslt1-dev \
acl \
nginx \
&& echo 'alias sf="php bin/console"' >> ~/.bashrc
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 ./docker/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf
RUN curl curl https://frankenphp.dev/install.sh | sh
RUN mv /usr/src/signer/frankenphp /usr/local/bin/
COPY ./docker/nginx/default.conf /etc/nginx/sites-enabled/default
COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
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
RUN composer install
RUN service php8.3-fpm start
# RUN service php8.3-fpm start
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["php-fpm8.3", "-F"]
# CMD ["php-fpm8.3", "-F", "nginx", "-g 'daemon off'"]
EXPOSE 9000

79
Dockerfile_local Normal file
View File

@ -0,0 +1,79 @@
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y wget libgtk-3-0 libpcsclite-dev pcscd curl software-properties-common git zip bash
RUN add-apt-repository ppa:ondrej/php
RUN apt update && apt install -y \
php-fpm \
php-curl \
php \
php-common \
php-cli \
php-xml \
gnupg \
g++ \
procps \
git \
unzip \
zlib1g-dev \
libzip-dev \
libfreetype6-dev \
libpng-dev \
libjpeg-dev \
libicu-dev \
libonig-dev \
libxslt1-dev \
acl \
&& 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 echo 'deb http://packages.lab50.net/okular jammy main non-free' > /etc/apt/sources.list.d/okulargost.list
COPY 3party/cprocsp/linux-amd64_deb.tgz /tmp/src/
RUN cd /tmp/src && \
tar -xf linux-amd64_deb.tgz && \
linux-amd64_deb/install.sh && \
dpkg -i linux-amd64_deb/cprocsp-pki-cades-64*.deb && \
dpkg -i linux-amd64_deb/cprocsp-rdr-* && \
# делаем симлинки
cd /bin && \
ln -s /opt/cprocsp/bin/amd64/certmgr && \
ln -s /opt/cprocsp/bin/amd64/cpverify && \
ln -s /opt/cprocsp/bin/amd64/cryptcp && \
ln -s /opt/cprocsp/bin/amd64/csptest && \
ln -s /opt/cprocsp/bin/amd64/csptestf && \
ln -s /opt/cprocsp/bin/amd64/der2xer && \
ln -s /opt/cprocsp/bin/amd64/inittst && \
ln -s /opt/cprocsp/bin/amd64/wipefile && \
ln -s /opt/cprocsp/sbin/amd64/cpconfig && \
#прибираемся
rm -rf /tmp/src
COPY 3party/okular/install.sh /tmp/
RUN bash /tmp/install.sh && rm -fv /tmp/install.sh
RUN apt update && apt install -y okular-csp-utils
RUN mkdir -p /root/.config
COPY license.key /license.key
RUN echo Y | pdfcpro install-license /license.key
COPY Inter-Bold.ttf /usr/local/share/fonts/Inter-Bold.ttf
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
WORKDIR /usr/src/signer/
COPY ./backend /usr/src/signer
COPY ./docker/php/www.conf /etc/php/8.3/fpm/pool.d/www.conf
# RUN curl curl https://frankenphp.dev/install.sh | sh
# RUN mv /usr/src/signer/frankenphp /usr/local/bin/
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN composer install
RUN service php8.3-fpm start
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["php-fpm8.3", "-F"]
EXPOSE 9000

View File

@ -1,6 +1,21 @@
server {
server_name _;
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,5 +1,6 @@
user www-data;
worker_processes 4;
daemon off;
pid /run/nginx.pid;
events {
@ -34,4 +35,3 @@ http {
fastcgi_buffer_size 32k;
}
daemon off;