diff --git a/README.md b/README.md index be6ef755..a61b99dd 100644 --- a/README.md +++ b/README.md @@ -49,21 +49,7 @@ BUSAPI_URL=http://dockerhost:8002/v5 ``` - 1. In the `./local` folder create `taas-es-processor.env` file with the next environment variables.
- - ```bash - # Auth0 config - AUTH0_URL= - AUTH0_AUDIENCE= - AUTH0_CLIENT_ID= - AUTH0_CLIENT_SECRET= - # Locally deployed services (via docker-compose) - KAFKA_URL=kafka:9093 - ES_HOST=http://elasticsearch:9200 - BUSAPI_URL=http://tc-bus-api:8002/v5 - ``` - - - Values from these file would be automatically used by many `npm` commands. + - Values from this file would be automatically used by many `npm` commands. - ⚠️ Never commit this file or its copy to the repository! 1. Set `dockerhost` to point the IP address of Docker. Docker IP address depends on your system. For example if docker is run on IP `127.0.0.1` add a the next line to your `/etc/hosts` file: @@ -234,8 +220,8 @@ To be able to change and test `taas-es-processor` locally you can follow the nex | `npm run cov` | Code Coverage Report. | | `npm run migrate` | Run any migration files which haven't run yet. | | `npm run migrate:undo` | Revert most recent migration. | -| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" | -| `npm run emsi-mapping` | mapping EMSI tags to topcoder skills | +| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" | +| `npm run emsi-mapping` | mapping EMSI tags to topcoder skills | ## Import and Export data diff --git a/local/docker-compose.yml b/local/docker-compose.yml index e7ea5a7f..e8db578a 100644 --- a/local/docker-compose.yml +++ b/local/docker-compose.yml @@ -58,8 +58,14 @@ services: depends_on: - kafka-client - elasticsearch - env_file: - - taas-es-processor.env + environment: + - KAFKA_URL=kafka:9093 + - ES_HOST=http://elasticsearch:9200 + - BUSAPI_URL=http://tc-bus-api:8002/v5 + - AUTH0_URL=${AUTH0_URL} + - AUTH0_AUDIENCE=${AUTH0_AUDIENCE} + - AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID} + - AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET} tc-bus-api: container_name: tc-bus-api diff --git a/package.json b/package.json index 17c1887b..31009f5f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "migrate": "npx sequelize db:migrate", "migrate:undo": "npx sequelize db:migrate:undo", "test": "mocha test/unit/*.test.js --timeout 30000 --require test/prepare.js --exit", - "services:up": "docker-compose -f ./local/docker-compose.yml up -d", + "services:up": "docker-compose -f ./local/docker-compose.yml --env-file .env up -d", "services:down": "docker-compose -f ./local/docker-compose.yml down", "services:logs": "docker-compose -f ./local/docker-compose.yml logs", "local:init": "npm run local:reset && npm run data:import -- --force",