@@ -66,15 +66,22 @@ endif
66
66
@echo "Updating containers..."
67
67
docker-compose pull
68
68
@echo "Build and run containers..."
69
+ mkdir -p $(COMPOSER_HOME_CACHE)
69
70
docker-compose up -d --remove-orphans
70
71
$(call php-0, apk add --no-cache graphicsmagick $(ADD_PHP_EXT))
72
+ $(call php-0, sh -c '[ ! -z "$$COMPOSER_HOME" -a -d $$COMPOSER_HOME ] && chown -R $(CUID):$(CGID) $$COMPOSER_HOME')
71
73
$(call php-0, kill -USR2 1)
72
74
$(call php, composer global require -o --update-no-dev --no-suggest "hirak/prestissimo:^0.3")
73
75
74
76
# # Install backend dependencies
75
77
back :
78
+ mkdir -p $(COMPOSER_HOME_CACHE )
76
79
docker-compose up -d --remove-orphans php # PHP container is required for composer
77
- ifeq ($(INSTALL_DEV_DEPENDENCIES ) , TRUE)
80
+ $(call php-0, apk add --no-cache $(ADD_PHP_EXT ) )
81
+ $(call php-0, sh -c '[ ! -z "$$COMPOSER_HOME" -a -d $$COMPOSER_HOME ] && chown -R $(CUID ) :$(CGID ) $$COMPOSER_HOME')
82
+ $(call php-0, kill -USR2 1)
83
+ $(call php, composer global require -o --update-no-dev --no-suggest "hirak/prestissimo:^0.3")
84
+ ifdef INSTALL_DEV_DEPENDENCIES
78
85
@echo "INSTALL_DEV_DEPENDENCIES=$(INSTALL_DEV_DEPENDENCIES)"
79
86
@echo "Installing composer dependencies, including dev ones"
80
87
$(call php, composer install --prefer-dist -o)
@@ -146,6 +153,10 @@ ifdef MYSQL_DIR
146
153
@echo "Removing mysql data from $(MYSQL_DIR) ..."
147
154
docker run --rm --user 0:0 -v $(shell dirname $(MYSQL_DIR)):/mnt $(IMAGE_PHP) sh -c "rm -fr /mnt/`basename $(MYSQL_DIR)`"
148
155
endif
156
+ ifdef COMPOSER_HOME_CACHE
157
+ @echo "Clean-up composer cache from $(COMPOSER_HOME_CACHE) ..."
158
+ docker run --rm --user 0:0 -v $(shell dirname $(abspath $(COMPOSER_HOME_CACHE))):/mnt $(IMAGE_PHP) sh -c "rm -fr /mnt/`basename $(COMPOSER_HOME_CACHE)`"
159
+ endif
149
160
ifeq ($(CLEAR_FRONT_PACKAGES ) , yes)
150
161
make clear-front
151
162
endif
0 commit comments