From 7b2c873d641854aa4f1c17fed303a35f150ce922 Mon Sep 17 00:00:00 2001 From: izacarias <iuli.zacarias@gmail.com> Date: Mon, 15 Apr 2024 11:00:10 -0300 Subject: [PATCH] New instreuctions to run IBI in docler. --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 7dec3e1..d7397e4 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,40 @@ sudo docker run --network host ibi_horse ``` +# Run Development Environment with Docker +1. Pull the Python Image from Docker Hub + ``` + docker pull python:3.8.10 + docker pull docker.elastic.co/elasticsearch/elasticsearch:8.13.2 + ``` + +2. Create a dedicated Docker Network for ElasticSearch + ``` + docker network create elastic + ``` + +3. Run ElastiSearch container (no need to run it locally) + ``` + docker run --name es01 --rm -it --net elastic -p 9200:9200 -p 9300:9300 -m 1GB -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.13.2 + ``` + +4. Run HORSE IBI Software + 4.1. One-line command + ``` + sudo docker run --name horse-ibi --rm -it --net elastic -p 7777:7777 --mount src=`pwd`,target=/code,type=bind -w /code python:3.8.10 sh -c "pip install -r requirements.txt && python app/main.py" + ``` + + 4.2. For debugging and info + ``` + sudo docker run --name horse-ibi --rm -it --net elastic -p 7777:7777 --mount src=`pwd`,target=/code,type=bind -w /code python:3.8.10 sh + ``` + From inside the container + ``` + pip install -r requirements.txt + python app/main.py + ``` +# Dockerfile + TODO: Update docker file + TODO: Create a docker file for development (Dockerfile.dev) + TODO: Create a docker file for deploy (Dockerfile.prod) \ No newline at end of file -- GitLab