You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.0 KiB

  1. SHELL := /bin/bash
  2. start: ## Start Wiki.js in production mode
  3. node wiki start
  4. stop: ## Stop Wiki.js
  5. node wiki stop
  6. restart: ## Restart Wiki.js
  7. node wiki restart
  8. dev-up: ## Start Wiki.js in development mode
  9. node wiki dev
  10. build: ## Build Wiki.js client assets
  11. webpack --profile --config dev/webpack/webpack.prod.js
  12. watch: ## Watch client files and rebuild assets on changes
  13. webpack --config dev/webpack/webpack.dev.js
  14. test: ## Run code linting tests
  15. eslint --format codeframe --ext .js,.vue .
  16. pug-lint server/views && jest
  17. docker-dev-up: ## Run dockerized dev environment
  18. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . up -d
  19. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . exec wiki yarn dev
  20. docker-dev-down: ## Shutdown dockerized dev environment
  21. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . down
  22. docker-dev-rebuild: ## Rebuild dockerized dev image
  23. rm -rf ./node_modules
  24. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . build --no-cache --force-rm
  25. docker-dev-clean: ## Clean DB, redis and data folders
  26. rm -rf ./data
  27. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . exec db psql --dbname=wiki --username=postgres --command='DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public'
  28. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . exec redis redis-cli flushall
  29. docker-build: ## Run assets generation build in docker
  30. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . run wiki yarn build
  31. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . down
  32. help: ## Display help
  33. @echo ''
  34. @echo -e 'usage: \033[1mmake [command] [args...]\033[0m'
  35. @echo ''
  36. @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
  37. @echo ''
  38. .PHONY: clean logs
  39. .DEFAULT_GOAL := help