Missing install for prod mode
This commit is contained in:
parent
eaf5639e41
commit
967f3f270a
@ -95,6 +95,7 @@ COPY . .
|
||||
|
||||
RUN set -eux; \
|
||||
mkdir -p var/cache var/log; \
|
||||
composer install --no-progress --no-suggest --no-interaction --no-dev --no-scripts; \
|
||||
composer dump-autoload --classmap-authoritative --no-dev; \
|
||||
composer run-script --no-dev post-install-cmd; sync
|
||||
VOLUME /srv/app/var
|
||||
@ -124,7 +125,10 @@ COPY --from=symfony_php /srv/app/public public/
|
||||
# "h2-proxy-cert" stage
|
||||
FROM alpine:latest AS symfony_h2-proxy-cert
|
||||
|
||||
RUN apk add --no-cache openssl
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
openssl \
|
||||
;
|
||||
|
||||
# Allow to set server name
|
||||
ARG SERVER_NAME="localhost"
|
||||
@ -151,7 +155,8 @@ RUN set -eux; \
|
||||
# create the signed certificate
|
||||
RUN openssl x509 -req -sha256 -extensions v3_ca -extfile extfile.cnf -days 365 \
|
||||
-in server.csr -signkey server.key -out server.crt \
|
||||
&& rm extfile.cnf
|
||||
&& rm extfile.cnf \
|
||||
&& update-ca-certificates
|
||||
|
||||
### "h2-proxy" stage
|
||||
FROM nginx:${NGINX_VERSION}-alpine AS symfony_h2-proxy
|
||||
|
@ -13,20 +13,20 @@ if [ "$1" = 'php-fpm' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
||||
fi
|
||||
ln -sf "$PHP_INI_RECOMMENDED" "$PHP_INI_DIR/php.ini"
|
||||
|
||||
mkdir -p var/cache var/log
|
||||
mkdir -p var/cache var/log
|
||||
|
||||
# The first time volumes are mounted, the project needs to be recreated
|
||||
if [ ! -f composer.json ]; then
|
||||
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
|
||||
jq '.extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
|
||||
rm tmp/composer.json
|
||||
mv tmp/composer.tmp.json tmp/composer.json
|
||||
# The first time volumes are mounted, the project needs to be recreated
|
||||
if [ ! -f composer.json ]; then
|
||||
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
|
||||
jq '.extra.symfony.docker=true' tmp/composer.json > tmp/composer.tmp.json
|
||||
rm tmp/composer.json
|
||||
mv tmp/composer.tmp.json tmp/composer.json
|
||||
|
||||
cp -Rp tmp/. .
|
||||
rm -Rf tmp/
|
||||
elif [ "$APP_ENV" != 'prod' ]; then
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||
fi
|
||||
cp -Rp tmp/. .
|
||||
rm -Rf tmp/
|
||||
elif [ "$APP_ENV" != 'prod' ]; then
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-interaction
|
||||
fi
|
||||
|
||||
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
||||
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
||||
|
Loading…
x
Reference in New Issue
Block a user