Skip to content

Commit

Permalink
fix(build): docker compose and implicit wait for elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Aranda committed May 20, 2021
1 parent 9e9ce9f commit 3a2c0f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ RUN rm -rf /build \
# See <https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker#module_name>
ENV MODULE_NAME="rubrix.server.server"
ENV VARIABLE_NAME="app"

CMD /wait-for-it.sh $ELASTICSEARCH -- /start.sh
2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ services:
environment:
ELASTICSEARCH: http://elasticsearch:9200

command: /wait-for-it.sh elasticsearch:9200 -- /start.sh

networks:
- rubrix

Expand Down
6 changes: 5 additions & 1 deletion release.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ COPY dist/*.whl /packages/

ENV USERS_DB=/config/.users.yml

RUN find /packages/*.whl -exec pip install {}[server] \;
RUN wget -O /wait-for-it.sh https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh \
&& chmod +x /wait-for-it.sh \
&& find /packages/*.whl -exec pip install {}[server] \;

# See <https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker#module_name>
ENV MODULE_NAME="rubrix.server.server"
ENV VARIABLE_NAME="app"

CMD /wait-for-it.sh $ELASTICSEARCH -- /start.sh

0 comments on commit 3a2c0f5

Please sign in to comment.