You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`ES_INDEX_JOB_CANDIDATE`: the job candidate index
36
-
-`ES_INDEX_RESOURCE_BOOKING`: the resource booking index
36
+
37
+
-`esConfig.HOST`: the elasticsearch host
38
+
-`esConfig.ES_INDEX_JOB`: the job index
39
+
-`esConfig.ES_INDEX_JOB_CANDIDATE`: the job candidate index
40
+
-`esConfig.ES_INDEX_RESOURCE_BOOKING`: the resource booking index
41
+
-`esConfig.AWS_REGION`: The Amazon region to use when using AWS Elasticsearch service
42
+
-`esConfig.ELASTICCLOUD.id`: The elastic cloud id, if your elasticsearch instance is hosted on elastic cloud. DO NOT provide a value for ES_HOST if you are using this
43
+
-`esConfig.ELASTICCLOUD.username`: The elastic cloud username for basic authentication. Provide this only if your elasticsearch instance is hosted on elastic cloud
44
+
-`esConfig.ELASTICCLOUD.password`: The elastic cloud password for basic authentication. Provide this only if your elasticsearch instance is hosted on elastic cloud
45
+
46
+
-`BUSAPI_URL`: Topcoder Bus API URL
47
+
-`KAFKA_ERROR_TOPIC`: The error topic at which bus api will publish any errors
48
+
-`KAFKA_MESSAGE_ORIGINATOR`: The originator value for the kafka messages
49
+
50
+
-`TAAS_JOB_CREATE_TOPIC`: the create job entity Kafka message topic
51
+
-`TAAS_JOB_UPDATE_TOPIC`: the update job entity Kafka message topic
52
+
-`TAAS_JOB_DELETE_TOPIC`: the delete job entity Kafka message topic
53
+
-`TAAS_JOB_CANDIDATE_CREATE_TOPIC`: the create job candidate entity Kafka message topic
54
+
-`TAAS_JOB_CANDIDATE_UPDATE_TOPIC`: the update job candidate entity Kafka message topic
55
+
-`TAAS_JOB_CANDIDATE_DELETE_TOPIC`: the delete job candidate entity Kafka message topic
56
+
-`TAAS_RESOURCE_BOOKING_CREATE_TOPIC`: the create resource booking entity Kafka message topic
57
+
-`TAAS_RESOURCE_BOOKING_UPDATE_TOPIC`: the update resource booking entity Kafka message topic
58
+
-`TAAS_RESOURCE_BOOKING_DELETE_TOPIC`: the delete resource booking entity Kafka message topic
37
59
38
60
39
61
## PostgreSQL Database Setup
40
62
- Go to https://www.postgresql.org/ download and install the PostgreSQL.
41
63
- Modify `DATABASE_URL` under `config/default.js` to meet your environment.
42
-
- Run `npm run init-db` to create table
64
+
- Run `npm run init-db` to create table(run `npm run init-db force` to force creating table)
43
65
44
66
## ElasticSearch Setup
45
67
- Go to https://www.elastic.co/downloads/ download and install the elasticsearch.
@@ -52,17 +74,41 @@ The following parameters can be set in config files or in env variables:
52
74
- Install dependencies `npm install`
53
75
- Run lint `npm run lint`
54
76
- Run lint fix `npm run lint:fix`
55
-
- Clear and init db `npm run init-db`
56
-
- Clear and create es index `npm run delete-index && npm run create-index`
77
+
- Clear and init db `npm run init-db force`
78
+
- Clear and create es index
79
+
80
+
```bash
81
+
npm run delete-index # run this if you already created index
82
+
npm run create-index
83
+
```
84
+
57
85
- Start app `npm start`
58
86
- App is running at `http://localhost:3000`
59
87
60
-
## Docker Deployment
61
-
- Run `docker-compose up`
88
+
## Local Deployment with Docker
89
+
90
+
Make sure all config values are right, and you can run on local successful, then run below commands
91
+
92
+
1. Navigate to the directory `docker`
93
+
94
+
2. Rename the file `sample.api.env` to `api.env`
95
+
96
+
3. Set the required AUTH0 configurations, PostgreSQL Database url and ElasticSearch host in the file `api.env`
97
+
98
+
Note that you can also add other variables to `api.env`, with `<key>=<value>` format per line.
99
+
If using AWS ES you should add `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` variables as well.
100
+
101
+
4. Once that is done, run the following command
102
+
103
+
```bash
104
+
docker-compose up
105
+
```
106
+
107
+
5. When you are running the application for the first time, It will take some time initially to download the image and install the dependencies
62
108
63
109
## Testing
64
110
- Run `npm run test` to execute unit tests
65
111
- Run `npm run cov` to execute unit tests and generate coverage report.
66
112
67
113
## Verification
68
-
Refer to the verification document [Verification.md](Verification.md)
114
+
Refer to the verification document [Verification.md](Verification.md)
0 commit comments