mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
FrankenPHP dockerfile is now working
This commit is contained in:
parent
7271c8c6f1
commit
1548b9f8c8
4 changed files with 27 additions and 20 deletions
|
@ -11,3 +11,8 @@ opcache.interned_strings_buffer = 16
|
||||||
opcache.max_accelerated_files = 20000
|
opcache.max_accelerated_files = 20000
|
||||||
opcache.memory_consumption = 256
|
opcache.memory_consumption = 256
|
||||||
opcache.enable_file_override = 1
|
opcache.enable_file_override = 1
|
||||||
|
|
||||||
|
memory_limit = 256M
|
||||||
|
|
||||||
|
upload_max_filesize=256M
|
||||||
|
post_max_size=300M
|
|
@ -57,5 +57,4 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
||||||
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#exec docker-php-entrypoint "$@"
|
exec docker-php-entrypoint "$@"
|
||||||
exec "$@"
|
|
|
@ -47,7 +47,6 @@ yarn-error.log
|
||||||
### From frankenphp
|
### From frankenphp
|
||||||
|
|
||||||
**/*.log
|
**/*.log
|
||||||
**/*.md
|
|
||||||
**/*.php~
|
**/*.php~
|
||||||
**/*.dist.php
|
**/*.dist.php
|
||||||
**/*.dist
|
**/*.dist
|
||||||
|
|
38
Dockerfile
38
Dockerfile
|
@ -1,41 +1,45 @@
|
||||||
FROM debian:bookworm-slim
|
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get -y install curl zip mariadb-client file acl git gettext ca-certificates gnupg \
|
||||||
RUN apt-get update && apt-get -y install apt-transport-https lsb-release ca-certificates curl zip mariadb-client file acl \
|
|
||||||
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \
|
|
||||||
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \
|
|
||||||
&& apt-get update && apt-get upgrade -y \
|
|
||||||
&& apt-get install -y apache2 php8.3 php8.3-fpm php8.3-opcache php8.3-curl php8.3-gd php8.3-mbstring php8.3-xml php8.3-bcmath php8.3-intl php8.3-zip php8.3-xsl php8.3-sqlite3 php8.3-mysql gpg \
|
|
||||||
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
|
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
# Create workdir and set permissions if directory does not exists
|
# Create workdir and set permissions if directory does not exists
|
||||||
RUN mkdir -p /app
|
RUN mkdir -p /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install PHP
|
||||||
|
RUN set -eux; \
|
||||||
|
install-php-extensions \
|
||||||
|
@composer \
|
||||||
|
apcu \
|
||||||
|
intl \
|
||||||
|
opcache \
|
||||||
|
zip \
|
||||||
|
pdo_mysql \
|
||||||
|
pdo_sqlite \
|
||||||
|
gd \
|
||||||
|
bcmath \
|
||||||
|
xsl \
|
||||||
|
;
|
||||||
|
|
||||||
# Copy config files for php and caddy
|
# Copy config files for php and caddy
|
||||||
ENV PHP_INI_DIR="/etc/php/8.3/"
|
|
||||||
COPY --link .docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/
|
COPY --link .docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/
|
||||||
COPY --chmod=755 .docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
COPY --chmod=755 .docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||||
COPY --link .docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
|
COPY --link .docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
|
||||||
COPY --link .docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/
|
COPY --link .docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/
|
||||||
COPY --link .docker/frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile
|
COPY --link .docker/frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile
|
||||||
|
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"
|
||||||
|
|
||||||
#RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||||
|
|
||||||
# Install node and yarn
|
# Install node and yarn
|
||||||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get update && apt-get install -y nodejs yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
|
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get update && apt-get install -y nodejs yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install FrankenPHP
|
|
||||||
COPY --from=dunglas/frankenphp:1-php8.3 /usr/local/bin/frankenphp /usr/local/bin/frankenphp
|
|
||||||
|
|
||||||
# And configure it
|
|
||||||
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"
|
|
||||||
|
|
||||||
# Install composer
|
# Install composer
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
# prevent the reinstallation of vendors at every changes in the source code
|
# prevent the reinstallation of vendors at every changes in the source code
|
||||||
COPY --link composer.* symfony.* ./
|
COPY --link composer.* symfony.* ./
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue