File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,7 @@ RUN rm -Rf docker/ Dockerfile docker-compose.yml
48
48
ENV SKELETON_COMPOSER_JSON https://raw.githubusercontent.com/symfony/skeleton/v3.3.2/composer.json
49
49
RUN [ -f composer.json ] || php -r "copy('$SKELETON_COMPOSER_JSON', 'composer.json');"
50
50
51
- RUN mkdir -p \
52
- var/cache \
53
- var/logs \
54
- var/sessions \
51
+ RUN mkdir -p var/cache var/logs var/sessions \
55
52
&& composer install --prefer-dist --no-dev --no-progress --no-suggest --optimize-autoloader --classmap-authoritative --no-interaction \
56
53
&& composer clear-cache \
57
54
# Permissions hack because setfacl does not work on Mac and Windows
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ services:
5
5
build :
6
6
context : .
7
7
dockerfile : ./Dockerfile
8
- # depends_on:
9
- # - db
10
8
volumes :
11
9
# Comment out the next line in production
12
10
- ./:/srv/app:rw
@@ -15,6 +13,7 @@ services:
15
13
- /srv/app/var/cache/
16
14
- /srv/app/var/logs/
17
15
- /srv/app/var/sessions/
16
+ - /srv/app/vendor/
18
17
19
18
nginx :
20
19
build :
Original file line number Diff line number Diff line change @@ -7,13 +7,12 @@ if [ "${1#-}" != "$1" ]; then
7
7
fi
8
8
9
9
if [ " $1 " = ' php-fpm' ] || [ " $1 " = ' bin/console' ]; then
10
- if [ " $APP_ENV " != ' prod' ]; then
11
- if [ ! -f composer.json ]; then
12
- php -r " copy('$SKELETON_COMPOSER_JSON ', 'composer.json');"
13
- fi
14
- mkdir -p var
15
- composer install --prefer-dist --no-progress --no-suggest --no-interaction
16
- fi
10
+ # The first time volumes are mounted, dependencies need to be reinstalled
11
+ if [ ! -f composer.json ]; then
12
+ rm -Rf vendor/*
13
+ php -r " copy('$SKELETON_COMPOSER_JSON ', 'composer.json');"
14
+ composer install --prefer-dist --no-progress --no-suggest --no-interaction
15
+ fi
17
16
18
17
# Permissions hack because setfacl does not work on Mac and Windows
19
18
chown -R www-data var
You can’t perform that action at this time.
0 commit comments