Skip to content

Commit 1c1ab57

Browse files
authored
Merge pull request #425 from eisbilir/fix/local-deploy-one-file
use single env file
2 parents 0d52605 + 721609d commit 1c1ab57

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

README.md

+3-17
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,7 @@
4949
BUSAPI_URL=http://dockerhost:8002/v5
5050
```
5151

52-
1. In the `./local` folder create `taas-es-processor.env` file with the next environment variables.<br>
53-
54-
```bash
55-
# Auth0 config
56-
AUTH0_URL=
57-
AUTH0_AUDIENCE=
58-
AUTH0_CLIENT_ID=
59-
AUTH0_CLIENT_SECRET=
60-
# Locally deployed services (via docker-compose)
61-
KAFKA_URL=kafka:9093
62-
ES_HOST=http://elasticsearch:9200
63-
BUSAPI_URL=http://tc-bus-api:8002/v5
64-
```
65-
66-
- Values from these file would be automatically used by many `npm` commands.
52+
- Values from this file would be automatically used by many `npm` commands.
6753
- ⚠️ Never commit this file or its copy to the repository!
6854

6955
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
234220
| `npm run cov` | Code Coverage Report. |
235221
| `npm run migrate` | Run any migration files which haven't run yet. |
236222
| `npm run migrate:undo` | Revert most recent migration. |
237-
| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" |
238-
| `npm run emsi-mapping` | mapping EMSI tags to topcoder skills |
223+
| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" |
224+
| `npm run emsi-mapping` | mapping EMSI tags to topcoder skills |
239225
240226
## Import and Export data
241227

local/docker-compose.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,14 @@ services:
5858
depends_on:
5959
- kafka-client
6060
- elasticsearch
61-
env_file:
62-
- taas-es-processor.env
61+
environment:
62+
- KAFKA_URL=kafka:9093
63+
- ES_HOST=http://elasticsearch:9200
64+
- BUSAPI_URL=http://tc-bus-api:8002/v5
65+
- AUTH0_URL=${AUTH0_URL}
66+
- AUTH0_AUDIENCE=${AUTH0_AUDIENCE}
67+
- AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID}
68+
- AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET}
6369

6470
tc-bus-api:
6571
container_name: tc-bus-api

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"migrate": "npx sequelize db:migrate",
2323
"migrate:undo": "npx sequelize db:migrate:undo",
2424
"test": "mocha test/unit/*.test.js --timeout 30000 --require test/prepare.js --exit",
25-
"services:up": "docker-compose -f ./local/docker-compose.yml up -d",
25+
"services:up": "docker-compose -f ./local/docker-compose.yml --env-file .env up -d",
2626
"services:down": "docker-compose -f ./local/docker-compose.yml down",
2727
"services:logs": "docker-compose -f ./local/docker-compose.yml logs",
2828
"local:init": "npm run local:reset && npm run data:import -- --force",

0 commit comments

Comments
 (0)