Skip to content

Commit 2292561

Browse files
committed
feat: dockerfile for vector
1 parent 9d83bd9 commit 2292561

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

infra/ingest/docker-compose.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
REDPANDA_PASSWORD: ${REDPANDA_PASSWORD}
1818
VECTOR_KAFKA_USER: ${VECTOR_KAFKA_USER}
1919
VECTOR_KAFKA_PASSWORD: ${VECTOR_KAFKA_PASSWORD}
20-
entrypoint: ["/bin/bash", "-c"]
20+
entrypoint: [ "/bin/bash", "-c" ]
2121
command:
2222
- |
2323
if [ -z "$$REDPANDA_ADVERTISED_HOST" ]; then
@@ -66,11 +66,7 @@ services:
6666
networks:
6767
- databuddy
6868
healthcheck:
69-
test:
70-
[
71-
"CMD-SHELL",
72-
'rpk cluster health -X user="$$REDPANDA_USER" -X pass="$$REDPANDA_PASSWORD" -X sasl.mechanism=SCRAM-SHA-256 | grep -q ''Healthy:.*true'' && rpk topic list -X user="$$REDPANDA_USER" -X pass="$$REDPANDA_PASSWORD" -X sasl.mechanism=SCRAM-SHA-256',
73-
]
69+
test: [ "CMD-SHELL", 'rpk cluster health -X user="$$REDPANDA_USER" -X pass="$$REDPANDA_PASSWORD" -X sasl.mechanism=SCRAM-SHA-256 | grep -q ''Healthy:.*true'' && rpk topic list -X user="$$REDPANDA_USER" -X pass="$$REDPANDA_PASSWORD" -X sasl.mechanism=SCRAM-SHA-256' ]
7470
interval: 10s
7571
timeout: 10s
7672
retries: 10
@@ -121,7 +117,7 @@ services:
121117
condition: service_healthy
122118
restart: true
123119
healthcheck:
124-
test: ["CMD", "vector", "validate", "/etc/vector/vector.yaml"]
120+
test: [ "CMD", "vector", "validate", "/etc/vector/vector.yaml" ]
125121
interval: 30s
126122
timeout: 10s
127123
retries: 3
@@ -130,6 +126,7 @@ services:
130126
volumes:
131127
redpanda_data:
132128

129+
133130
networks:
134131
databuddy:
135132
name: databuddy

infra/ingest/vector.Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM timberio/vector:0.50.0-alpine
2+
3+
COPY vector.yaml /etc/vector/vector.yaml
4+
5+
WORKDIR /etc/vector
6+
7+
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=10s \
8+
CMD ["vector", "validate", "/etc/vector/vector.yaml"]
9+
10+
CMD ["--config", "/etc/vector/vector.yaml"]

0 commit comments

Comments
 (0)