Skip to content

Commit

Permalink
feat: Improve docker services (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
esloch authored Feb 9, 2024
1 parent 3c49af3 commit b1d67d6
Show file tree
Hide file tree
Showing 5 changed files with 1,711 additions and 97 deletions.
8 changes: 8 additions & 0 deletions .makim.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 1.0
groups:
develop:
targets:
gen-certs:
help: Generate and copy certs
run: |
mkdir -p containers/esconfig/certs
docker cp es:/usr/share/elasticsearch/config/certs/http_ca.crt ./containers/esconfig/certs/
curl --cacert ./containers/esconfig/certs/http_ca.crt -u elastic:worksfine https://es:9200/
clean:
targets:
all:
Expand Down
28 changes: 27 additions & 1 deletion containers/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
version: '3'
version: "3.9"

services:
es:
hostname: es
container_name: es
image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0
user: "1000:1000" # Set the UID:GID to run the container
environment:
- discovery.type=single-node
- node.name=es
- ELASTIC_PASSWORD=worksfine
- bootstrap.memory_lock=true
# - xpack.security.enabled=true
# - xpack.security.http.ssl.enabled=true
# - xpack.security.http.ssl.key=/usr/share/elasticsearch/config/certs/es/elastic-certificates.key
# - xpack.security.http.ssl.certificate=/usr/share/elasticsearch/config/certs/es/elastic-certificates.crt
# - xpack.security.http.ssl.certificate_authorities=/usr/share/elasticsearch/config/certs/ca/ca.crt
ports:
- 9200:9200
expose:
- 9200
networks:
- elastic
healthcheck:
test: ["CMD-SHELL", "curl -s -k https://localhost:9200 | grep -q 'missing authentication credentials'"]

app:
build:
context: ..
Expand All @@ -13,3 +33,9 @@ services:
- "5000:5000"
depends_on:
- es
networks:
- elastic

networks:
elastic:
driver: bridge
Loading

0 comments on commit b1d67d6

Please sign in to comment.