Skip to content

Commit b554ea0

Browse files
DaemonSnakebastien Penavayre
andauthored
docker compose: add kibana and add optional EXAMPLE_NAME build arg to select example (#535)
* docker compose: add kibana * docker: add EXAMPLE_NAME arg to Dockerfile and docker/runserver.sh --------- Co-authored-by: bastien Penavayre <[email protected]>
1 parent de81269 commit b554ea0

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ ADD ./examples/ $WORKDIR/examples
55
WORKDIR $WORKDIR
66
RUN pip install git+https://github.com/toluaina/pgsync.git
77
COPY ./docker/wait-for-it.sh wait-for-it.sh
8+
ARG EXAMPLE_NAME=airbnb
9+
ENV EXAMPLE_NAME=$EXAMPLE_NAME
810
COPY ./docker/runserver.sh runserver.sh
911
RUN chmod +x wait-for-it.sh
1012
RUN chmod +x runserver.sh

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ services:
2121
- xpack.security.enabled=false
2222
- network.host=127.0.0.1
2323
- http.host=0.0.0.0
24+
kibana:
25+
image: docker.elastic.co/kibana/kibana:7.17.13
26+
ports:
27+
- "5601:5601"
28+
environment:
29+
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
30+
depends_on:
31+
- elasticsearch
2432
pgsync:
2533
build:
2634
context: .

docker/runserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
./wait-for-it.sh $REDIS_HOST:$REDIS_PORT -t 60
88

9-
EXAMPLE_DIR="examples/airbnb"
9+
EXAMPLE_DIR="examples/${EXAMPLE_NAME:-airbnb}"
1010

1111
python $EXAMPLE_DIR/schema.py --config $EXAMPLE_DIR/schema.json
1212

0 commit comments

Comments
 (0)