Some checks failed
Cadoles/hydra-sql/pipeline/head There was a failure building this commit
62 lines
1.3 KiB
Docker
62 lines
1.3 KiB
Docker
|
|
## 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 |