Skip to content

Commit

Permalink
Improvements as suggested by @risdenk:
Browse files Browse the repository at this point in the history
- removed hostnames from `docker-compose.yml`
- removed unnecessary port definition
- changed container and/or service names where appropriate
- removed unnecessary `cat` command in ES Dockerfile
- removed `links` as `depends_on` already does that implicitly
- removed `command` from quepid definition in `docker-compose.yml`
  • Loading branch information
wrigleyDan committed Feb 21, 2022
1 parent d659b0d commit 1e142c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
14 changes: 2 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ services:

elasticsearch:
container_name: elasticsearch
hostname: elasticsearch
build: ./elasticsearch/.
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
Expand All @@ -31,7 +30,6 @@ services:
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"

kibana:
container_name: kibana
Expand All @@ -40,7 +38,7 @@ services:
- 5601:5601

chorus-ui:
container_name: chorus_es_ui
container_name: chorus_ui
build: ./reactivesearch/.
volumes:
- './reactivesearch:/usr/src/app'
Expand All @@ -49,7 +47,7 @@ services:
- 4001:3000

redis:
container_name: quepid_redis
container_name: redis
image: redis:6.2.6-alpine
ports:
- 6379:6379
Expand All @@ -59,7 +57,6 @@ services:
image: o19s/quepid:6.10.0
ports:
- 3000:3000
command: "foreman s -f Procfile"
environment:
- PORT=3000
- RACK_ENV=production
Expand All @@ -84,15 +81,11 @@ services:
links:
- mysql
- redis
depends_on:
- mysql
- redis

prometheus:
image: prom/prometheus:v2.32.1
container_name: prometheus
restart: always
hostname: prometheus
ports:
- 9090:9090
command:
Expand All @@ -104,7 +97,6 @@ services:
image: grafana/grafana:7.5.13
container_name: grafana
restart: always
hostname: grafana
ports:
- 9091:3000
volumes:
Expand All @@ -117,7 +109,6 @@ services:

elasticsearch-exporter:
image: quay.io/prometheuscommunity/elasticsearch-exporter:latest
hostname: elasticsearch-exporter
container_name: elasticsearch-exporter
command:
- '--es.uri=http://elasticsearch:9200'
Expand All @@ -128,7 +119,6 @@ services:
keycloak:
image: quay.io/keycloak/keycloak:16.1.0
container_name: keycloak
hostname: keycloak
command: ["-b", "0.0.0.0", "-Dkeycloak.migration.action=import", "-Dkeycloak.migration.provider=dir", "-Dkeycloak.migration.dir=/opt/jboss/keycloak/realm-config", "-Dkeycloak.migration.strategy=OVERWRITE_EXISTING", "-Djboss.socket.binding.port-offset=1000", "-Dkeycloak.profile.feature.upload_scripts=enabled"]
ports:
- 9080:9080
Expand Down
1 change: 0 additions & 1 deletion elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ RUN ./bin/elasticsearch-plugin install --batch \
"https://repo1.maven.org/maven2/org/querqy/querqy-elasticsearch/1.5.es7162.0/querqy-elasticsearch-1.5.es7162.0.zip"

COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/
RUN cat /usr/share/elasticsearch/config/elasticsearch.yml
7 changes: 3 additions & 4 deletions quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ RESET='\033[0m' # No Color

export DOCKER_SCAN_SUGGEST=false


if ! [ -x "$(command -v curl)" ]; then
echo '${ERROR}Error: curl is not installed.${RESET}' >&2
echo "${ERROR}Error: curl is not installed.${RESET}" >&2
exit 1
fi
if ! [ -x "$(command -v docker-compose)" ]; then
echo '${ERROR}Error: docker-compose is not installed.${RESET}' >&2
echo "${ERROR}Error: docker-compose is not installed.${RESET}" >&2
exit 1
fi
if ! [ -x "$(command -v jq)" ]; then
echo '${ERROR}Error: jq is not installed.${RESET}' >&2
echo "${ERROR}Error: jq is not installed.${RESET}" >&2
exit 1
fi

Expand Down

0 comments on commit 1e142c3

Please sign in to comment.