File tree Expand file tree Collapse file tree 5 files changed +25
-373
lines changed Expand file tree Collapse file tree 5 files changed +25
-373
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ services:
32
32
producer :
33
33
build : ./services/producer
34
34
container_name : kafka-nodejs-example-producer
35
- command : ./wait-for-it.sh zookeeper:2181 -- ./ wait-for-it.sh kafka:9092 -- ./ wait-for-it.sh database:5432 -- npm start
35
+ command : sh -c "dockerize -wait tcp:// zookeeper:2181 -wait tcp:// kafka:9092 -wait tcp:// database:5432 npm start"
36
36
depends_on :
37
37
- zookeeper
38
38
- kafka
@@ -50,7 +50,7 @@ services:
50
50
consumer :
51
51
build : ./services/consumer
52
52
container_name : kafka-nodejs-example-consumer
53
- command : ./wait-for-it.sh zookeeper:2181 -- ./ wait-for-it.sh kafka:9092 -- ./ wait-for-it.sh database:5432 -- npm start
53
+ command : sh -c "dockerize -wait tcp:// zookeeper:2181 -wait tcp:// kafka:9092 -wait tcp:// database:5432 npm start"
54
54
depends_on :
55
55
- zookeeper
56
56
- kafka
@@ -61,4 +61,4 @@ services:
61
61
PGUSER : ${POSTGRES_USER}
62
62
PGDATABASE : ${POSTGRES_USER}
63
63
PGPASSWORD : ${POSTGRES_PASSWORD}
64
- KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
64
+ KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
Original file line number Diff line number Diff line change 1
- FROM node:8.11.3 -alpine
1
+ FROM node:10.9 -alpine
2
2
MAINTAINER Anthony Hastings <
[email protected] >
3
3
4
- # Installing bash.
5
- RUN apk add --no-cache bash bash-doc bash-completion
6
-
7
4
# Create a directory (to house our source files) and navigate to it.
8
5
WORKDIR /src
9
6
10
- # Copy over the bash script to test and wait on the availability of a TCP host and port.
11
- COPY ./wait-for-it.sh /src/
12
- RUN chmod +x /src/wait-for-it.sh
7
+ # Installing dockerize which can test and wait on the availability of a TCP host and port.
8
+ ENV DOCKERIZE_VERSION v0.6.1
9
+ RUN apk add --no-cache openssl \
10
+ && wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
11
+ && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
12
+ && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
13
+
14
+ # Installing bash.
15
+ RUN apk add --no-cache bash bash-doc bash-completion
13
16
14
17
# Copy over the package.json and lock file to the containers working directory.
15
18
COPY ./package.json ./package-lock.json /src/
@@ -24,4 +27,4 @@ RUN apk add --no-cache --virtual .gyp \
24
27
&& apk del .gyp
25
28
26
29
# Copy everything in the host folder into the working folder of the container.
27
- COPY ./src /src/
30
+ COPY ./src /src/
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- FROM node:8.11.3 -alpine
1
+ FROM node:10.9 -alpine
2
2
MAINTAINER Anthony Hastings <
[email protected] >
3
3
4
- # Installing bash.
5
- RUN apk add --no-cache bash bash-doc bash-completion
6
-
7
4
# Create a directory (to house our source files) and navigate to it.
8
5
WORKDIR /src
9
6
10
- # Copy over the bash script to test and wait on the availability of a TCP host and port.
11
- COPY ./wait-for-it.sh /src/
12
- RUN chmod +x /src/wait-for-it.sh
7
+ # Installing dockerize which can test and wait on the availability of a TCP host and port.
8
+ ENV DOCKERIZE_VERSION v0.6.1
9
+ RUN apk add --no-cache openssl \
10
+ && wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
11
+ && tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
12
+ && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
13
+
14
+ # Installing bash.
15
+ RUN apk add --no-cache bash bash-doc bash-completion
13
16
14
17
# Copy over the package.json and lock file to the containers working directory.
15
18
COPY ./package.json ./package-lock.json /src/
@@ -27,4 +30,4 @@ RUN apk add --no-cache --virtual .gyp \
27
30
COPY ./src /src/
28
31
29
32
# Expose the specified port back to the host machine.
30
- EXPOSE 8080
33
+ EXPOSE 8080
You can’t perform that action at this time.
0 commit comments