Skip to content

Commit b124410

Browse files
authored
Refactor: make elastic service startup optional (#35)
2 parents 88f18fb + 35149c8 commit b124410

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.devcontainer/devcontainer.json

-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@
22
"name": "caltrans/pems",
33
"dockerComposeFile": ["../compose.yml"],
44
"service": "dev",
5-
"runServices": [
6-
"dev",
7-
"docs",
8-
"es01",
9-
"kibana",
10-
"metricbeat01",
11-
"filebeat01",
12-
"logstash01"
13-
],
145
"forwardPorts": ["docs:8000", "kibana:5601"],
156
"workspaceFolder": "/home/caltrans/src",
167
"postAttachCommand": ["/bin/bash", ".devcontainer/postAttach.sh"],

.env.sample

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# uncomment to start the elasticstack services with compose
2+
# COMPOSE_PROFILES=elasticstack
3+
14
# Version of Elastic products
25
ELASTIC_STACK_VERSION=8.16.1
36

compose.yml

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ services:
1919
- ./:/home/caltrans/src
2020

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

3637
es01:
38+
profiles: ["elasticstack"]
3739
depends_on:
3840
esconfig:
3941
condition: service_healthy
@@ -78,6 +80,7 @@ services:
7880
retries: 120
7981

8082
kibana:
83+
profiles: ["elasticstack"]
8184
depends_on:
8285
es01:
8386
condition: service_healthy
@@ -111,6 +114,7 @@ services:
111114
retries: 120
112115

113116
metricbeat01:
117+
profiles: ["elasticstack"]
114118
depends_on:
115119
es01:
116120
condition: service_healthy
@@ -139,6 +143,7 @@ services:
139143
- --strict.perms=false
140144

141145
filebeat01:
146+
profiles: ["elasticstack"]
142147
depends_on:
143148
es01:
144149
condition: service_healthy
@@ -163,6 +168,7 @@ services:
163168
- --strict.perms=false
164169

165170
logstash01:
171+
profiles: ["elasticstack"]
166172
depends_on:
167173
es01:
168174
condition: service_healthy

0 commit comments

Comments
 (0)