diff --git a/README.md b/README.md index d5cf4d33de..3eb480a175 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,43 @@ Anticrm Platform is a framework that helps in building business applications (such as CRM) fast. The current exemplary applications include Chat, Issue Management (Tracker), Applicant Tracking System, Boards, Leads, and HR. +- [Pre-requisites](#pre-requisites) +- [Fast start](#fast-start) +- [Installation](#installation) +- [Build and run](#build-and-run) +- Development mode + - [Run in development mode](#run-in-development-mode) + - [Update project structure and database](#update-project-structure-and-database) + - Tests + - [Tests](#tests) + - [Unit tests](#unit-tests) + - [UI tests](#ui-tests) + - [Package publishing](#package-publishing) + +## Pre-requisites + +- Make sure you have the following installed on your system: + - [Node.js](https://nodejs.org/en/download/) + - [Docker](https://docs.docker.com/get-docker/) + - [Docker Compose](https://docs.docker.com/compose/install/) +- Make sure what docker and docker-compose commands are available in your terminal (e.g. `docker --version` and `docker-compose --version`). +- Make sure what docker and docker-compose commands can be executed without sudo (e.g. `docker run hello-world` and `docker-compose --version`). + +## Fast start + +```bash +sh ./scripts/fast-start.sh +``` + ## Installation You need Microsoft's [rush](https://rushjs.io) to install application. -Install [rush](https://rushjs.io) with `$ npm install -g @microsoft/rush` command and run `$ rush install` from the repository root, followed by `$ rush build`. +Install [rush](https://rushjs.io) with `$ npm install -g @microsoft/rush` command and run `$ rush install` from the repository root, followed by `$ rush build` or just: + +```bash +sh ./scripts/presetup-rush.sh +``` ## Build and run @@ -23,6 +55,12 @@ rush docker:build # Will build Docker containers for all applications in the l docker-compose up -d --force-recreate # Will set up all the containers ``` +or just: + +```bash +sh ./scripts/build.sh +``` + By default, Docker volumes named dev_db, dev_elastic, and dev_files will be created for the MongoDB, Elasticsearch, and MinIO instances. Before you can begin, you need to create a workspace and an account and associate it with the workspace. @@ -37,6 +75,13 @@ rushx run-local confirm-email user1 # To allow the creation of additional test w ``` +or just: +sh ./scripts/build.sh + +```bash +sh ./scripts/create-workspace.sh +``` + Accessing the URL http://localhost:8087 will lead you to the app in production mode. Limitations: diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 0000000000..3da7ed85c4 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,6 @@ +cd ./dev/ +rush build # Will build all the required packages. +rush bundle # Will prepare bundles. +rush docker:build # Will build Docker containers for all applications in the local Docker environment. +docker-compose up -d --force-recreate # Will set up all the containers + diff --git a/scripts/create-workspace.sh b/scripts/create-workspace.sh new file mode 100644 index 0000000000..000459c201 --- /dev/null +++ b/scripts/create-workspace.sh @@ -0,0 +1,6 @@ +cd ./tool +rushx run-local create-workspace ws1 -o DevWorkspace # Create workspace +rushx run-local create-account user1 -p 1234 -f John -l Appleseed # Create account +rushx run-local configure sanity-ws --list --enable '*' # Enable all modules, even if they are not yet intended to be used by a wide audience. +rushx run-local assign-workspace user1 ws1 # Assign workspace to user. +rushx run-local confirm-email user1 # To allow the creation of additional test workspaces. \ No newline at end of file diff --git a/scripts/fast-start.sh b/scripts/fast-start.sh new file mode 100644 index 0000000000..8e611f4b38 --- /dev/null +++ b/scripts/fast-start.sh @@ -0,0 +1,3 @@ +sh ./scripts/presetup-rush.sh +sh ./scripts/build.sh +sh ./scripts/create-workspace.sh diff --git a/scripts/presetup-rush.sh b/scripts/presetup-rush.sh new file mode 100644 index 0000000000..1ee83e604c --- /dev/null +++ b/scripts/presetup-rush.sh @@ -0,0 +1,3 @@ +npm install -g @microsoft/rush +rush install +rush build \ No newline at end of file