Skip to content

Commit

Permalink
docker compose: add kibana and add optional EXAMPLE_NAME build arg to…
Browse files Browse the repository at this point in the history
… 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]>
  • Loading branch information
DaemonSnake and bastien Penavayre authored Jun 11, 2024
1 parent de81269 commit b554ea0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ADD ./examples/ $WORKDIR/examples
WORKDIR $WORKDIR
RUN pip install git+https://github.com/toluaina/pgsync.git
COPY ./docker/wait-for-it.sh wait-for-it.sh
ARG EXAMPLE_NAME=airbnb
ENV EXAMPLE_NAME=$EXAMPLE_NAME
COPY ./docker/runserver.sh runserver.sh
RUN chmod +x wait-for-it.sh
RUN chmod +x runserver.sh
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ services:
- xpack.security.enabled=false
- network.host=127.0.0.1
- http.host=0.0.0.0
kibana:
image: docker.elastic.co/kibana/kibana:7.17.13
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
depends_on:
- elasticsearch
pgsync:
build:
context: .
Expand Down
2 changes: 1 addition & 1 deletion docker/runserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

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

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

Expand Down

0 comments on commit b554ea0

Please sign in to comment.