diff --git a/.docker/intelmq-full-dev/Dockerfile b/.docker/intelmq-full-dev/Dockerfile index 2e3d96a..b0e1f30 100644 --- a/.docker/intelmq-full-dev/Dockerfile +++ b/.docker/intelmq-full-dev/Dockerfile @@ -11,8 +11,13 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* WORKDIR /opt +ADD entrypoint-dev.sh /opt/entrypoint-dev.sh ADD install_reqs_and_deploy_bots /opt/install_reqs_and_deploy_bots.sh +RUN sudo chmod +x /opt/entrypoint-dev.sh \ + && sudo chown intelmq:intelmq /opt/entrypoint-dev.sh RUN sudo chmod +x /opt/install_reqs_and_deploy_bots.sh \ && sudo chown intelmq:intelmq /opt/install_reqs_and_deploy_bots.sh USER intelmq:intelmq + +ENTRYPOINT [ "/opt/entrypoint-dev.sh" ] diff --git a/.docker/intelmq-full-dev/install_reqs_and_deploy_bots b/.docker/intelmq-full-dev/install_reqs_and_deploy_bots index 3bedd27..6006121 100755 --- a/.docker/intelmq-full-dev/install_reqs_and_deploy_bots +++ b/.docker/intelmq-full-dev/install_reqs_and_deploy_bots @@ -7,7 +7,6 @@ done cat /tmp/fullrequirements.txt | sort | uniq > /tmp/orderfullrequirements.txt sudo pip3 install -r /tmp/orderfullrequirements.txt; - -#cd /etc/intelmq -#sudo pip3 install --no-cache-dir -e . -#sudo intelmqsetup +cd /etc/intelmq +sudo pip3 install --no-cache-dir -e . +sudo intelmqsetup diff --git a/DEVELOP-GUIDE.md b/DEVELOP-GUIDE.md index 153a547..53c1e8a 100644 --- a/DEVELOP-GUIDE.md +++ b/DEVELOP-GUIDE.md @@ -30,7 +30,13 @@ docker-compose -f docker-compose-dev.yml up ### Volumes: -- **./my_fork_of_intelmq/intelmq:/etc/intelmq/intelmq** -> this is the folder where your source code need to be, we decide to use fork from intelmq so you could inherit intelmq changes and upgrades to your bots code directly. +- **./my_fork_of_intelmq/:/my_fork_of_intelmq** -> this is the folder where your source code need to be, we decide to use fork from intelmq so you could inherit intelmq changes and upgrades to your bots code directly. + +### Environment + #Folder where you clone your repository + MY_FORK: "/my_fork_of_intelmq" + #Foder in your repo where bots are located + MY_BOTS_FOLDER: "intelmq/bots" ### Add your own bots diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 0dd8003..9af23da 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -24,7 +24,7 @@ services: - ./example_config/intelmq-api/config.json:/etc/intelmq/api-config.json - ./intelmq_logs:/opt/intelmq/var/log - ./intelmq_output:/opt/intelmq/var/lib/bots - - ./my_fork_of_intelmq/:${MY_FORK}/${MY_BOTS_FOLDER} + - ./mybots:/my_fork_of_intelmq depends_on: - redis environment: @@ -36,8 +36,8 @@ services: INTELMQ_SOURCE_PIPELINE_HOST: redis INTELMQ_DESTINATION_PIPELINE_HOST: redis INTELMQ_REDIS_CACHE_HOST: redis - MY_FORK: "my_fork_of_intelmq" - MY_BOTS_FOLDER: "intelmq/bots" + MY_FORK: "/my_fork_of_intelmq" + MY_BOTS_FOLDER: "bots" networks: - intelmq-internal networks: