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

Refactor: make elastic service startup optional #35

Merged
merged 2 commits into from
Dec 9, 2024
Merged
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
9 changes: 0 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@
"name": "caltrans/pems",
"dockerComposeFile": ["../compose.yml"],
"service": "dev",
"runServices": [
"dev",
"docs",
"es01",
"kibana",
"metricbeat01",
"filebeat01",
"logstash01"
],
"forwardPorts": ["docs:8000", "kibana:5601"],
"workspaceFolder": "/home/caltrans/src",
"postAttachCommand": ["/bin/bash", ".devcontainer/postAttach.sh"],
Expand Down
3 changes: 3 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# uncomment to start the elasticstack services with compose
# COMPOSE_PROFILES=elasticstack

# Version of Elastic products
ELASTIC_STACK_VERSION=8.16.1

Expand Down
6 changes: 6 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
- ./:/home/caltrans/src

esconfig:
profiles: ["elasticstack"]
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_STACK_VERSION}
user: "0"
command: ["bash", "/.local/config/setup.sh"]
Expand All @@ -34,6 +35,7 @@ services:
retries: 120

es01:
profiles: ["elasticstack"]
depends_on:
esconfig:
condition: service_healthy
Expand Down Expand Up @@ -78,6 +80,7 @@ services:
retries: 120

kibana:
profiles: ["elasticstack"]
depends_on:
es01:
condition: service_healthy
Expand Down Expand Up @@ -111,6 +114,7 @@ services:
retries: 120

metricbeat01:
profiles: ["elasticstack"]
depends_on:
es01:
condition: service_healthy
Expand Down Expand Up @@ -139,6 +143,7 @@ services:
- --strict.perms=false

filebeat01:
profiles: ["elasticstack"]
depends_on:
es01:
condition: service_healthy
Expand All @@ -163,6 +168,7 @@ services:
- --strict.perms=false

logstash01:
profiles: ["elasticstack"]
depends_on:
es01:
condition: service_healthy
Expand Down