--wip-- [skip ci]
Some checks failed
Cadoles/hydra-sql/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-26 16:43:39 +02:00
parent d79cf65bb4
commit 9318e753c1
32 changed files with 1489 additions and 1352 deletions

View File

@@ -0,0 +1,62 @@
## NPM INSTALL ##
FROM node:24.7.0 AS npm-install
ARG ENCORE_MODE=production
WORKDIR /app
COPY . .
RUN npm install \
&& npm run build
## COMPOSER INSTALL ##
FROM dunglas/frankenphp:1.9.1-php8.4-bookworm AS composer-install
ARG APP_ENV=prod \
APP_DEBUG=0 \
APP_LOCALES="fr,en" \
BASE_PATH=""
COPY ./misc/files/Caddyfile /etc/frankenphp/Caddyfile
WORKDIR /app
COPY --from=npm-install /app .
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN apt-get -y update \
&& apt-get -y install git \
&& install-php-extensions \
opcache \
apcu \
&& composer install --ignore-platform-reqs --no-cache -a --no-dev \
&& composer dump-autoload --no-dev --classmap-authoritative \
&& bin/console assets:install --symlink --relative
## FINAL IMAGE ##
FROM dunglas/frankenphp:1.9.1-php8.4-bookworm
ARG VERSION
ENV APP_ENV=prod \
APP_DEBUG=0 \
APP_LOCALES="fr,en" \
BASE_PATH="" \
VERSION=${VERSION}
COPY ./misc/files/Caddyfile /etc/frankenphp/Caddyfile
COPY ./misc/files/frankenphp.caddyfile-prod /etc/frankenphp/Caddyfile.d/frankenphp.caddyfile
WORKDIR /app
COPY --from=composer-install /app .
RUN cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini \
&& install-php-extensions \
pdo_pgsql \
pdo_mysql \
opcache \
apcu