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.

56 lines
2.1 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=wikijs --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-dev-bash: ## Rebuild dockerized dev image
  30. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . exec wiki bash
  31. docker-build: ## Run assets generation build in docker
  32. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . run wiki yarn build
  33. docker-compose -f ./dev/docker/docker-compose.yml -p wiki --project-directory . down
  34. help: ## Display help
  35. @echo ''
  36. @echo -e 'usage: \033[1mmake [command] [args...]\033[0m'
  37. @echo ''
  38. @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
  39. @echo ''
  40. .PHONY: clean logs
  41. .DEFAULT_GOAL := help