Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/make
  2. build_stack:
  3. docker-compose build && \
  4. docker-compose up -d
  5. build_bedrock:
  6. rm -rf ./src/* && \
  7. docker exec -it -u root php-fpm sh -c \
  8. "chown -R 1000:1000 /app/public && \
  9. npm install --global yarn && \
  10. touch /.yarnrc && \
  11. chown 1000 /.yarnrc && \
  12. chmod +r /.yarnrc && \
  13. mkdir /.cache && \
  14. chown 1000 /.cache && \
  15. chmod +r /.cache" &&\
  16. docker exec -it -w /app/public php-fpm sh -c \
  17. "composer create-project roots/bedrock && \
  18. cd bedrock && \
  19. composer update && \
  20. composer require roots/acorn && \
  21. composer require wpackagist-plugin/redis-cache && \
  22. echo \"define('WP_REDIS_HOST', 'redis');\" >> /app/public/bedrock/config/application.php && \
  23. echo \"define('WP_REDIS_PORT', '6379');\" >> /app/public/bedrock/config/application.php" && \
  24. cp Docker/php/.env src/bedrock/.env
  25. build_theme:
  26. docker exec -it -w /app/public/bedrock/web/app/themes php-fpm sh -c \
  27. "composer create-project roots/sage partition-jlg-theme" && \
  28. cp Docker/php/bud.config.js src/bedrock/web/app/themes/partition-jlg-theme/bud.config.js && \
  29. docker exec -it -w /app/public/bedrock/web/app/themes/partition-jlg-theme php-fpm sh -c \
  30. "yarn && \
  31. yarn build"
  32. install_theme:
  33. docker exec -it -w /app/public/bedrock/web/app/themes/partition-jlg-theme php-fpm sh -c \
  34. "yarn && \
  35. yarn build && \
  36. composer install"