Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change docker file to support elastic_search #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions docker-compose-override-README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# on dev/local machine, copy this file as "docker-compose.override.yml"

version: "3.4"

services:
frontend:
image: node:lts
volumes:
- ./FrontEnd:/frontend
- /frontend/node_modules
env_file:
.env
container_name: "frontend"
labels:
- "traefik.enable=true"
- "traefik.backend=frontend"
- "traefik.port=3000"
- "traefik.frontend.rule=PathPrefix: /"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
command: /bin/sh -c "cd frontend; yarn; yarn install; yarn start"

pythonrpcserver:
volumes:
- "${DATA:-~/docker_data}/data:/data"

db:
ports:
- "5432:5432"

pgadmin:
image: dpage/pgadmin4:4.11
depends_on:
- db
- traefik
volumes:
- "${DATA:-~/docker_data}/pga4volume:/var/lib/pgadmin"
env_file:
- ".env"
environment:
- PGADMIN_DEFAULT_EMAIL=${ADMIN_USER_ID:-guest}
- PGADMIN_DEFAULT_PASSWORD=${ADMIN_PASSWORD:-guest}
container_name: "pgadmin"
labels:
- "traefik.enable=true"
- "traefik.backend=pgadmin"
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix:/pgadmin"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"

elasticsearch:
ports:
- "9200:9200"
- "9300:9300"

kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:7.6.2
ports:
- 5601:5601
depends_on:
- elasticsearch
environment:
- ELASTICSEARCH_URL=http://localhost:9200
# environment:
# - SERVER_BASEPATH=/kibana/
labels:
- "traefik.enable=true"
- "traefik.backend=frontend"
- "traefik.port=5601"
- "traefik.frontend.rule=PathPrefix: /kibana/"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"

rabbitmq:
ports:
- "5672:5672"

37 changes: 14 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,15 @@ services:
image: postgres:11.7
volumes:
- "${DATA:-~/docker_data}/pgvolume:/var/lib/postgresql/data"
ports:
- "5432:5432"
#ports:
# - "5432:5432"
env_file:
- ".env"
environment:
- POSTGRES_USER=${ADMIN_USER_ID:-guest}
- POSTGRES_PASSWORD=${ADMIN_PASSWORD:-guest}
container_name: "db"

pgadmin:
image: dpage/pgadmin4:4.11
depends_on:
- db
- traefik
volumes:
- "${DATA:-~/docker_data}/pga4volume:/var/lib/pgadmin"
env_file:
- ".env"
environment:
- PGADMIN_DEFAULT_EMAIL=${ADMIN_USER_ID:-guest}
- PGADMIN_DEFAULT_PASSWORD=${ADMIN_PASSWORD:-guest}
container_name: "pgadmin"
labels:
- "traefik.enable=true"
- "traefik.backend=pgadmin"
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix:/pgadmin"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"

rabbitmq:
image: rabbitmq:management
container_name: "rabbitmq"
Expand Down Expand Up @@ -180,4 +160,15 @@ services:
- "traefik.port=80"
- "traefik.frontend.rule=PathPrefix: /"
- "traefik.website.frontend.whiteList.sourceRange=${TRAEFIK_IPFILTER:-172.16.0.0/12}"
container_name: "frontend"
container_name: "frontend"

elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
volumes:
- "${DATA:-~/docker_data}/elasticsearch:/usr/share/elasticsearch/data"
environment:
- xpack.monitoring.enabled=true
- xpack.watcher.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this enough memory? How big will the index be, I think we should set Xmx to 2GB

- discovery.type=single-node