Skip to content

Commit

Permalink
Refactor localhost docker-compose
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Stas <patrik.stas@gmail.com>
  • Loading branch information
Patrik-Stas committed Jul 18, 2021
1 parent d3b6a4d commit d37d886
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 50 deletions.
25 changes: 20 additions & 5 deletions start/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
## ES
es-up:
docker-compose -f docker-compose.es.yml up && \
make logs-es

es-logs:
docker-compose -f docker-compose.es.yml logs -f

es-down:
docker-compose -f docker-compose.es.yml down --remove-orphans

es-destroy:
docker-compose -f docker-compose.es.yml down --remove-orphans --volumes

## Full Indyscan + ES
logs:
docker-compose -f docker-compose.yml logs -f
docker-compose -f docker-compose.yml -f docker-compose.es.yml logs -f

up:
docker-compose -f docker-compose.yml up && \
docker-compose -f docker-compose.yml -f docker-compose.es.yml up && \
make logs

down:
docker-compose -f docker-compose.yml down --remove-orphans
docker-compose -f docker-compose.yml -f docker-compose.es.yml down --remove-orphans

destroy:
docker-compose -f docker-compose.yml down --remove-orphans --volumes
docker-compose -f docker-compose.yml -f docker-compose.es.yml down --remove-orphans --volumes

new:
make destroy && \
docker-compose -f docker-compose.yml up -d && \
docker-compose -f docker-compose.yml -f docker-compose.es.yml up -d && \
make logs
69 changes: 69 additions & 0 deletions start/docker-compose.es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
version: '3.7'

x-es-logging:
&es-logging
options:
max-size: '300m'
max-file: '2'
driver: json-file

x-standard-logging:
&service-logging
options:
max-size: '500m'
max-file: '3'
driver: json-file

x-ui-logging:
&ui-logging
options:
max-size: '100m'
max-file: '3'
driver: json-file

services:
indyscan-elasticsearch:
image: ${INDYSCAN_ELASTICSEARCH_IMAGE:-docker.elastic.co/elasticsearch/elasticsearch:7.6.1}
container_name: indyscan-elasticsearch
logging: *es-logging
networks:
- esnet
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- indyscan-es:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300

indyscan-kibana:
container_name: indyscan-kibana
image: ${INDYSCAN_KIBANA_IMAGE:-docker.elastic.co/kibana/kibana:7.6.1}
logging: *es-logging
networks:
- esnet
environment:
- ELASTICSEARCH_HOSTS=http://indyscan-elasticsearch.esnet:9200
ports:
- 5601:5601
depends_on:
- indyscan-elasticsearch

networks:
esnet:
name: esnet
driver: bridge

volumes:
indyscan-es:
driver: local
45 changes: 0 additions & 45 deletions start/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,6 @@ services:
ports:
- 9701-9708:9701-9708

indyscan-elasticsearch:
image: ${INDYSCAN_ELASTICSEARCH_IMAGE:-docker.elastic.co/elasticsearch/elasticsearch:7.6.1}
container_name: indyscan-elasticsearch
logging: *es-logging
networks:
- esnet
environment:
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
cap_add:
- IPC_LOCK
volumes:
- indyscan-es:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300

indyscan-kibana:
container_name: indyscan-kibana
image: ${INDYSCAN_KIBANA_IMAGE:-docker.elastic.co/kibana/kibana:7.6.1}
logging: *es-logging
networks:
- esnet
environment:
- ELASTICSEARCH_HOSTS=http://indyscan-elasticsearch.esnet:9200
ports:
- 5601:5601
depends_on:
- indyscan-elasticsearch
#
indyscan-daemon:
restart: unless-stopped
image: ${INDYSCAN_DAEMON_IMAGE:-pstas/indyscan-daemon:4.1.0}
Expand Down Expand Up @@ -143,15 +106,7 @@ services:
ports:
- 3710:3710


networks:
indyscan:
name: indyscan
driver: bridge
esnet:
name: esnet
driver: bridge

volumes:
indyscan-es:
driver: local

0 comments on commit d37d886

Please sign in to comment.