Skip to content

Commit

Permalink
Added files for docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
shu-tom committed Aug 3, 2020
1 parent ddbae5a commit b97dc4a
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docker-compose/LogonTracer/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM python:3.7.8-slim-buster

RUN set -ex \
\
&& savedAptMark="$(apt-mark showmanual)" \
&& apt-get update \
&& apt-get install -y --no-install-recommends git \
dpkg-dev \
gcc \
libssl-dev \
make

## LogonTracer install
WORKDIR /usr/local/src

RUN git clone https://github.com/JPCERTCC/LogonTracer.git \
&& chmod 777 LogonTracer \
&& chmod 777 LogonTracer/static \
&& cd LogonTracer \
&& pip install cython \
&& pip install numpy \
&& pip install scipy==1.2.1 \
&& pip install statsmodels==0.10.2 \
&& pip install -r requirements.txt \
&& sed -i 's/\" -s \" + NEO4J_SERVER/\" -s neo4j\"/' logontracer.py

## Create setup file
WORKDIR /usr/local/src

RUN echo "#!/bin/bash" > run.sh \
&& echo "cd /usr/local/src/LogonTracer" >> run.sh \
&& echo "python logontracer.py -r -o 8080 -u neo4j -p password -s \${LTHOSTNAME}" >> run.sh \
&& chmod 755 run.sh

EXPOSE 8080

CMD ["/usr/local/src/run.sh"]
46 changes: 46 additions & 0 deletions docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: "3"
services:
neo4j:
container_name: neo4j
image: neo4j:4.1.1
# Using volumes slows down the container.
#volumes:
# - ./neo4j/data:/data
# - ./neo4j/logs:/logs
# - ./neo4j/conf:/conf
# Set when sync container and local time
# - /etc/localtime:/etc/localtime:ro
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_dbms_default__database=neo4j
- NEO4J_dbms_connector_bolt_listen__address=0.0.0.0:7687
- NEO4J_dbms_connector_http_listen__address=0.0.0.0:7474
# Performance tuning for JVM neo4j
# See more details: https://neo4j.com/developer/guide-performance-tuning/
- NEO4J_dbms_memory_heap_max__size=4G
- NEO4J_dbms_memory_heap_initial__size=2G
- NEO4j_dbms_memory_pagecache_size=20G
# set default neo4j password
- NEO4J_AUTH=neo4j/password
networks:
- neo4j-network

logontracer:
container_name: logontracer
build: ./LogonTracer/build
image: logontracer:latest
#volumes:
# Set when sync container and local time
# - /etc/localtime:/etc/localtime:ro
ports:
- "8080:8080"
environment:
- LTHOSTNAME=localhost
networks:
- neo4j-network

networks:
neo4j-network:
external: true
Empty file.
Empty file.
Empty file.

0 comments on commit b97dc4a

Please sign in to comment.