Merge pull request #11 from kejwmen/feature/select-skeleton-version
Support building using specific symfony version
This commit is contained in:
commit
5f034376d6
@ -39,8 +39,11 @@ RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress
|
|||||||
ARG STABILITY=stable
|
ARG STABILITY=stable
|
||||||
ENV STABILITY ${STABILITY}
|
ENV STABILITY ${STABILITY}
|
||||||
|
|
||||||
|
# Allow to select skeleton version
|
||||||
|
ARG VERSION=""
|
||||||
|
|
||||||
# Download the Symfony skeleton and leverage Docker cache layers
|
# Download the Symfony skeleton and leverage Docker cache layers
|
||||||
RUN composer create-project "symfony/skeleton" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-plugins --no-interaction
|
RUN composer create-project "symfony/skeleton ${VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-plugins --no-interaction
|
||||||
|
|
||||||
###> recipes ###
|
###> recipes ###
|
||||||
###< recipes ###
|
###< recipes ###
|
||||||
|
@ -4,6 +4,9 @@ services:
|
|||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
args:
|
||||||
|
VERSION: ${SYMFONY_VERSION}
|
||||||
|
STABILITY: stable
|
||||||
volumes:
|
volumes:
|
||||||
# Comment out the next line in production
|
# Comment out the next line in production
|
||||||
- ./:/srv/app:rw
|
- ./:/srv/app:rw
|
||||||
|
@ -9,7 +9,7 @@ fi
|
|||||||
if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
|
if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
|
||||||
# The first time volumes are mounted, the project needs to be recreated
|
# The first time volumes are mounted, the project needs to be recreated
|
||||||
if [ ! -f composer.json ]; then
|
if [ ! -f composer.json ]; then
|
||||||
composer create-project "symfony/skeleton" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
|
composer create-project "symfony/skeleton $VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
|
||||||
cp -Rp tmp/. .
|
cp -Rp tmp/. .
|
||||||
rm -Rf tmp/
|
rm -Rf tmp/
|
||||||
elif [ "$APP_ENV" != 'prod' ]; then
|
elif [ "$APP_ENV" != 'prod' ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user