Skip to content

Commit e086692

Browse files
committed
Made DOCKER_HOST_IP optional in docker-compose, and GraphQL test
1 parent 23f1c18 commit e086692

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ task compileAll(type: GradleBuild) {
5656

5757
dockerCompose {
5858
projectName = null
59+
removeOrphans = true
5960
if (project.hasProperty('startedService'))
6061
startedServices= [project.ext.startedService]
6162

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ services:
77
environment:
88
ZOOKEEPER_CLIENT_PORT: 2181
99
kafka:
10-
image: "confluentinc/cp-enterprise-kafka:5.2.4"
10+
image: "confluentinc/cp-kafka:5.2.4"
1111
ports:
1212
- 9092:9092
1313
depends_on:
1414
- zookeeper
1515
environment:
1616
KAFKA_LISTENERS: LC://kafka:29092,LX://kafka:9092
17-
KAFKA_ADVERTISED_LISTENERS: LC://kafka:29092,LX://localhost:9092
17+
KAFKA_ADVERTISED_LISTENERS: LC://kafka:29092,LX://${DOCKER_HOST_IP:-localhost}:9092
1818
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LC:PLAINTEXT,LX:PLAINTEXT
1919
KAFKA_INTER_BROKER_LISTENER_NAME: LC
2020
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181

ftgo-api-gateway-graphql/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM node:9.11.2-alpine
22
COPY package.json .
33
COPY package-lock.json .
44
RUN npm install
5-
RUN npm install -g typescript
5+
RUN npm config set unsafe-perm true && npm install -g typescript
66
COPY tsconfig.json .
77
ADD src ./src
88
RUN npm run build

ftgo-api-gateway-graphql/tests/end-to-end/client.end2end.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ afterAll(() => {
1919
*/
2020

2121
test('findConsumerWithOrders', () => {
22-
const client = new FtgoGraphQLClient({baseUrl: `http://${process.env.DOCKER_HOST_IP}:8088`});
22+
const client = new FtgoGraphQLClient({baseUrl: `http://${process.env.DOCKER_HOST_IP || "localhost"}:8088`});
2323

2424
return client.findConsumerWithOrders("1")
2525
.then(result => {
@@ -29,4 +29,4 @@ test('findConsumerWithOrders', () => {
2929
console.log("result.data", JSON.stringify(result.data));
3030
});
3131

32-
});
32+
});

0 commit comments

Comments
 (0)