fix: only set composer proxy when vendor absent, use offline install otherwise
Some checks failed
Deploy Backend / deploy (push) Failing after 1m4s
Some checks failed
Deploy Backend / deploy (push) Failing after 1m4s
This commit is contained in:
parent
640bd67556
commit
b51d8b00c2
@ -9,11 +9,10 @@ COPY --chown=www-data:www-data . /var/www/html/
|
||||
|
||||
ENV COMPOSER_HOME=/tmp/composer
|
||||
USER www-data
|
||||
RUN composer config -g repos.packagist composer https://registry.parsaaghayi.ir/repository/composer-proxy/ && \
|
||||
if [ -d /var/www/html/vendor ]; then \
|
||||
COMPOSER_DISABLE_NETWORK=1 composer install --no-dev --optimize-autoloader --no-interaction 2>/dev/null || \
|
||||
composer install --no-dev --optimize-autoloader --no-interaction; \
|
||||
RUN if [ -d /var/www/html/vendor ]; then \
|
||||
COMPOSER_DISABLE_NETWORK=1 composer install --no-dev --optimize-autoloader --no-interaction; \
|
||||
else \
|
||||
composer config -g repos.packagist composer https://registry.parsaaghayi.ir/repository/composer-proxy/ && \
|
||||
composer install --no-dev --optimize-autoloader --no-interaction; \
|
||||
fi
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user