-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andrey Sobolev <[email protected]>
- Loading branch information
Showing
30 changed files
with
455 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug server", | ||
"type": "node", | ||
"request": "launch", | ||
"args": ["src/__start.ts"], | ||
"env": { | ||
"ELASTIC_URL": "http://localhost:9200", | ||
"MONGO_URL": "mongodb://localhost:27017" | ||
}, | ||
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"], | ||
"sourceMaps": true, | ||
"cwd": "${workspaceRoot}/server/server", | ||
"protocol": "inspector" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,40 @@ You need Microsoft's [rush](https://rushjs.io) to install application. Install [ | |
cd dev/prod | ||
rushx dev | ||
``` | ||
|
||
Then go to http://localhost:8080/login:component:LoginApp and use following credentials to login into the system: | ||
|
||
* login: [email protected] | ||
* pass: 1111 | ||
* workspace: trx40 | ||
- login: [email protected] | ||
- pass: 1111 | ||
- workspace: trx40 | ||
|
||
To connect to running local server `dev-server` command should be used instead. | ||
|
||
## Build and run inside docker | ||
|
||
It is possible to setup all environment required with local docker containers. | ||
Supported both amd64 and armv8 containers. | ||
|
||
```bash | ||
rush build # Will build all required packages. | ||
rush bundle # Will prepare bundles. | ||
rush docker:build # Will build docker containers for all applications. | ||
cd ./dev/ | ||
docker-compose up -d --force-recreate # Will setup all containers | ||
|
||
# we a few seconds delay, to be sure elastic is up and running. | ||
./deploy/setup-es-attachment-pipeline.sh # Setup elastic search plugin configuration. | ||
``` | ||
|
||
By default docker volumes `dev_db` `dev_elastic` `dev_files` will be created for mongo/elastic/minio instances. | ||
|
||
Before we could start we need to create workspace/account and associate it with workspace. | ||
|
||
```bash | ||
cd ./dev/tools | ||
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 assign-workspace user1 ws1 # Assign worksapce to user | ||
``` | ||
|
||
Following URL http://localhost:8081/login:component:LoginApp will lead us to app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
services: | ||
mongodb: | ||
image: mongo | ||
container_name: mongodb | ||
environment: | ||
- PUID=1000 | ||
- PGID=1000 | ||
volumes: | ||
- db:/data/db | ||
ports: | ||
- 27017:27017 | ||
restart: unless-stopped | ||
minio: | ||
image: 'minio/minio' | ||
command: server /data --address ":9000" --console-address ":9001" | ||
ports: | ||
- 9000:9000 | ||
volumes: | ||
- files:/data | ||
elastic: | ||
image: 'elasticsearch:7.14.0' | ||
command: | | ||
/bin/sh -c "./bin/elasticsearch-plugin list | grep -q ingest-attachment || yes | ./bin/elasticsearch-plugin install --silent ingest-attachment; | ||
/usr/local/bin/docker-entrypoint.sh eswrapper" | ||
volumes: | ||
- elastic:/usr/share/elasticsearch/data | ||
ports: | ||
- 9200:9200 | ||
environment: | ||
- ELASTICSEARCH_PORT_NUMBER=9200 | ||
- BITNAMI_DEBUG=true | ||
- discovery.type=single-node | ||
account: | ||
image: anticrm/account | ||
links: | ||
- mongodb | ||
ports: | ||
- 3000:3000 | ||
environment: | ||
- MONGO_URL=mongodb://mongodb:27017 | ||
- TRANSACTOR_URL=ws://localhost:3333 | ||
front: | ||
image: anticrm/front | ||
links: | ||
- mongodb | ||
- minio | ||
- elastic | ||
- server | ||
- upload | ||
ports: | ||
- 8081:8080 | ||
environment: | ||
- ACCOUNTS_URL=http://localhost:3000 | ||
- UPLOAD_URL=/files | ||
- TRANSACTOR_URL=ws://localhost:3333 | ||
- ELASTIC_URL=http://elastic:9200 | ||
- MINIO_ENDPOINT=minio | ||
- MINIO_ACCESS_KEY=minioadmin | ||
- MINIO_SECRET_KEY=minioadmin | ||
transactor: | ||
image: anticrm/transactor | ||
links: | ||
- mongodb | ||
- elastic | ||
ports: | ||
- 3333:3333 | ||
environment: | ||
- ELASTIC_URL=http://elastic:9200 | ||
- MONGO_URL=mongodb://mongodb:27017 | ||
volumes: | ||
db: | ||
files: | ||
elastic: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
|
||
CLIENT_TYPE=dev | ||
ACCOUNTS_URL=/account | ||
UPLOAD_URL=/upload | ||
LOGIN_TOKEN=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJvc2FtdW5kQGhjLmVuZ2luZWVyaW5nIiwid29ya3NwYWNlIjoidHJ4NDAifQ.dYsCF2VRbuc-zmRt0yLAww1_--xtX4P1EqPFREEzCjQ | ||
# LOGIN_ENDPOINT=ws://localhost:3333 | ||
LOGIN_ENDPOINT=wss://transactor.hc.engineering/ | ||
LOGIN_ENDPOINT=ws://localhost:3333 | ||
|
||
LOGIN_TOKEN_DEV=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJlbWFpbCI6InJvc2FtdW5kQGhjLmVuZ2luZWVyaW5nIiwid29ya3NwYWNlIjoidHJ4NDAifQ.dYsCF2VRbuc-zmRt0yLAww1_--xtX4P1EqPFREEzCjQ | ||
LOGIN_ENDPOINT_DEV=wss://transactor.hc.engineering/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
|
||
|
||
#ACCOUNTS_URL=https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/ | ||
ACCOUNTS_URL=https://account.hc.engineering/ | ||
UPLOAD_URL=/files | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"ACCOUNTS_URL":"http://localhost:3000","UPLOAD_URL":"/files"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"ACCOUNTS_URL":"/account", | ||
"UPLOAD_URL":"/files" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.