Skip to content
Snippets Groups Projects
Commit 1b632c81 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Refatoring docker-compose.

parent 86cfa275
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
.vscode/ .vscode/
.volumes/ .volumes/
data/ data/
docs/
infrastructure/ infrastructure/
gui/ gui/
__pycache__/ __pycache__/
*.pyc *.pyc
\ No newline at end of file
...@@ -39,11 +39,13 @@ RUN python nomad/dependencies.py ...@@ -39,11 +39,13 @@ RUN python nomad/dependencies.py
FROM final FROM final
# transfer installed packages from dependency stage # transfer installed packages from dependency stage
COPY --from=dependencies /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages COPY --from=dependencies /usr/local/lib/python3.6/site-packages /usr/local/lib/python3.6/site-packages
COPY --from=dependencies /usr/local/bin/sphinx-build /usr/local/bin/sphinx-build
# we also need to copy the install dir, since nomad coe deps are installed with -e # we also need to copy the install dir, since nomad coe deps are installed with -e
# TODO that should be changed in production! # TODO that should be changed in production!
COPY --from=dependencies /install /install COPY --from=dependencies /install /install
# do stuff # do stuff
RUN apt-get update && apt-get install -y make
COPY . /app COPY . /app
WORKDIR /app WORKDIR /app
RUN pip install -e . RUN pip install -e .
......
File added
...@@ -6,4 +6,4 @@ MONGO_HOST_PORT=27017 ...@@ -6,4 +6,4 @@ MONGO_HOST_PORT=27017
KIBANA_HOST_PORT=5601 KIBANA_HOST_PORT=5601
API_HOST_PORT=8000 API_HOST_PORT=8000
GUI_HOST_PORT=8005 GUI_HOST_PORT=8005
\ No newline at end of file
...@@ -5,5 +5,7 @@ ELASTIC_HOST_PORT=10200 ...@@ -5,5 +5,7 @@ ELASTIC_HOST_PORT=10200
MONGO_HOST_PORT=10017 MONGO_HOST_PORT=10017
KIBANA_HOST_PORT=10601 KIBANA_HOST_PORT=10601
API_HOST_PORT=8000 API_HOST_PORT=8083
GUI_HOST_PORT=8005 GUI_HOST_PORT=127.0.0.1:8003
\ No newline at end of file
ELASTIC_VOLUME=nomadxt_elastic
.env
...@@ -20,7 +20,7 @@ services: ...@@ -20,7 +20,7 @@ services:
restart: always restart: always
image: minio/minio:RELEASE.2018-06-08T03-49-38Z image: minio/minio:RELEASE.2018-06-08T03-49-38Z
# image: minio/minio # image: minio/minio
container_name: nomad-xt-minio container_name: nomadxt_minio
ports: ports:
- ${MINIO_HOST_PORT}:9000 - ${MINIO_HOST_PORT}:9000
volumes: volumes:
...@@ -35,7 +35,7 @@ services: ...@@ -35,7 +35,7 @@ services:
rabbitmq: rabbitmq:
restart: always restart: always
image: rabbitmq image: rabbitmq
container_name: nomad-xt-rabbitmq container_name: nomadxt_rabbitmq
environment: environment:
- RABBITMQ_ERLANG_COOKIE=SWQOKODSQALRPCLNMEQG - RABBITMQ_ERLANG_COOKIE=SWQOKODSQALRPCLNMEQG
- RABBITMQ_DEFAULT_USER=rabbitmq - RABBITMQ_DEFAULT_USER=rabbitmq
...@@ -47,7 +47,7 @@ services: ...@@ -47,7 +47,7 @@ services:
# results backend for celery # results backend for celery
redis: redis:
image: redis:3.0-alpine image: redis:3.0-alpine
container_name: nomad-xt-redis container_name: nomadxt_redis
command: redis-server --appendonly yes command: redis-server --appendonly yes
volumes: volumes:
- ../../.volumes/redis:/data - ../../.volumes/redis:/data
...@@ -57,16 +57,15 @@ services: ...@@ -57,16 +57,15 @@ services:
# the search engine # the search engine
elastic: elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2 image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
container_name: nomad-xt-elastic
volumes: volumes:
- ../../.volumes/elastic:/usr/share/elasticsearch/data - nomadxt_elastic:/usr/share/elasticsearch/data
ports: ports:
- ${ELASTIC_HOST_PORT}:9200 - ${ELASTIC_HOST_PORT}:9200
# the user data db # the user data db
mongo: mongo:
image: mongo:latest image: mongo:latest
container_name: nomad-xt-mongo container_name: nomadxt_mongo
environment: environment:
- MONGO_DATA_DIR=/data/db - MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null - MONGO_LOG_DIR=/dev/null
...@@ -80,7 +79,7 @@ services: ...@@ -80,7 +79,7 @@ services:
elk: elk:
restart: always restart: always
build: ../elk/ build: ../elk/
container_name: nomad-xt-elk container_name: nomadxt_elk
expose: expose:
- 5000 # logstash beats - 5000 # logstash beats
- 5044 # logstash tcp - 5044 # logstash tcp
...@@ -90,7 +89,6 @@ services: ...@@ -90,7 +89,6 @@ services:
# nomad processing worker # nomad processing worker
worker: worker:
build: ../../ build: ../../
container_name: nomad-xt-worker
environment: environment:
- NOMAD_MINIO_PORT=9000 - NOMAD_MINIO_PORT=9000
- NOMAD_MINIO_HOST=minio - NOMAD_MINIO_HOST=minio
...@@ -158,4 +156,7 @@ services: ...@@ -158,4 +156,7 @@ services:
links: links:
- api - api
ports: ports:
- ${GUI_HOST_PORT}:80 - ${GUI_HOST_PORT}:80
\ No newline at end of file
volumes:
nomadxt_elastic:
...@@ -24,4 +24,4 @@ WORKDIR /install ...@@ -24,4 +24,4 @@ WORKDIR /install
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
COPY requirements-dep.txt requirements-dep.txt COPY requirements-dep.txt requirements-dep.txt
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
RUN pip install -r requirements-dep.txt RUN pip install -r requirements-dep.txt
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment