Skip to content

Commit

Permalink
Add local composer cache
Browse files Browse the repository at this point in the history
  • Loading branch information
andypost committed Oct 21, 2020
1 parent e53e8bd commit f045ce1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ IMAGE_SOLR=solr:8-slim
IMAGE_REDIS=redis:5-alpine
IMAGE_DRIVER=zenika/alpine-chrome
CLEAR_FRONT_PACKAGES=no
ADD_PHP_EXT=
ADD_PHP_EXT=graphicsmagick
#ADD_PHP_EXT=php7-pdo_pgsql postgresql-client postgresql-contrib gnu-libiconv wkhtmltopdf
MAIN_DOMAIN_NAME=docker.localhost
DB_URL=sqlite:./../.cache/d8.sqlite
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ prepare:front:
- echo "CI_PROJECT_NAME=${CI_PROJECT_NAME}"
- echo "REVIEW_DOMAIN=${REVIEW_DOMAIN}"
- mkdir -p ${BUILD_DIR}
- rsync -ah --exclude=.git --delete ./ ${BUILD_DIR}
- rsync -ah --exclude=.git --exclude=.cache --delete ./ ${BUILD_DIR}
- cd ${BUILD_DIR}
- echo "COMPOSE_PROJECT_NAME=${CI_PROJECT_NAME}-review-${CI_COMMIT_REF_SLUG}" >> .env.default
- echo "MAIN_DOMAIN_NAME=${CI_ENVIRONMENT_SLUG}-${CI_PROJECT_PATH_SLUG}.${REVIEW_DOMAIN}" >> .env.default
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif
docker-compose pull
@echo "Build and run containers..."
docker-compose up -d --remove-orphans
$(call php-0, apk add --no-cache graphicsmagick tzdata $(ADD_PHP_EXT))
$(call php-0, apk add --no-cache tzdata $(ADD_PHP_EXT))
# Set up timezone
$(call php-0, cp /usr/share/zoneinfo/Europe/Paris /etc/localtime)
$(call php-0, kill -USR2 1)
Expand Down Expand Up @@ -145,7 +145,7 @@ down:
@if [ ! -z "$(shell docker ps -f 'name=$(COMPOSE_PROJECT_NAME)_chrome' --format '{{.Names}}')" ]; then \
echo 'Stoping browser driver.' && make -s browser_driver_stop; fi

DIRS = web/core web/libraries web/modules/contrib web/profiles/contrib web/sites web/themes/contrib vendor
DIRS = web/core web/libraries web/modules/contrib web/profiles/contrib web/sites web/themes/contrib vendor .cache/composer/cache

## Totally remove project build folder, docker containers and network
clean: info
Expand Down
3 changes: 2 additions & 1 deletion docker/docker-compose.override.yml.default
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
php:
environment:
COMPOSER_MEMORY_LIMIT: "-1"
COMPOSER_CACHE_DIR: /var/www/html/.cache/composer/cache
# BLACKFIRE_CLIENT_ID: x
# BLACKFIRE_CLIENT_TOKEN: x
# NEW_RELIC_LICENSE_KEY: x
Expand Down Expand Up @@ -38,7 +39,7 @@ services:
# - front

# adminer:
# image: dockette/adminer:mysql-php7
# image: adminer:standalone
# container_name: "${COMPOSE_PROJECT_NAME}_adminer"
# links:
# - mysql:mysql
Expand Down

0 comments on commit f045ce1

Please sign in to comment.