File tree Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Expand file tree Collapse file tree 6 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,5 @@ misconfigurations:
2
2
# The tools Dockerfile doesn't need a healthcheck.
3
3
- id : AVD-DS-0026
4
4
paths :
5
- - Dockerfile.consumer # Jira -67
6
- - Dockerfile.redoer # Jira -67
7
5
- Dockerfile.exporter # ephemeral container, healthcheck not necessary
8
6
- Dockerfile.tools
Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ FROM senzing/senzingsdk-runtime:4.0.0
3
3
USER root
4
4
5
5
RUN apt-get update \
6
- && apt-get -y install --no-install-recommends python3 python3-pip python3-boto3 \
6
+ && apt-get -y install --no-install-recommends python3 python3-pip python3-boto3 procps \
7
7
&& apt-get -y autoremove \
8
8
&& apt-get -y clean
9
9
10
10
WORKDIR /app
11
11
COPY middleware/* .
12
12
13
+ RUN chmod +x healthcheck.sh
14
+
13
15
# Add a new user and switch to it.
14
16
RUN useradd -m -u 1001 senzing
15
17
USER senzing
@@ -23,4 +25,6 @@ ENV PYTHONUNBUFFERED=1
23
25
# Fargate.
24
26
VOLUME ["/home/senzing", "/var/lib/amazon", "/var/log"]
25
27
28
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ./healthcheck.sh consumer.py || exit 1
29
+
26
30
CMD ["python3", "consumer.py"]
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ RUN apt-get update \
10
10
WORKDIR /app
11
11
COPY middleware/* .
12
12
13
+ RUN chmod +x healthcheck.sh
14
+
13
15
# Add a new user and switch to it.
14
16
RUN useradd -m -u 1001 senzing
15
17
USER senzing
@@ -19,4 +21,6 @@ ENV PYTHONPATH=/opt/senzing/er/sdk/python:/app
19
21
# Flush buffer - helps with print statements.
20
22
ENV PYTHONUNBUFFERED=1
21
23
24
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 CMD ./healthcheck.sh redoer.py || exit 1
25
+
22
26
CMD ["python3", "redoer.py"]
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ simultaneously as needed):
181
181
``` bash
182
182
docker compose run --env AWS_PROFILE=localstack --env \
183
183
Q_URL=" http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/sqs-senzing-local-ingest" \
184
- --env LOG_LEVEL=INFO consumer
184
+ --env LOG_LEVEL=DEBUG consumer
185
185
```
186
186
187
187
` LOG_LEVEL ` is optional; defaults to ` INFO ` .
@@ -191,7 +191,7 @@ simultaneously as needed):
191
191
Similar to the consumer, the redoer is also a continually-running process.
192
192
193
193
```bash
194
- docker compose run --env AWS_PROFILE=localstack --env LOG_LEVEL=debug redoer
194
+ docker compose run --env AWS_PROFILE=localstack --env LOG_LEVEL=DEBUG redoer
195
195
```
196
196
197
197
` LOG_LEVEL ` is optional; defaults to ` INFO ` .
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ services:
104
104
"CONNECTION": "postgresql://${POSTGRES_USERNAME:-senzing}:${POSTGRES_PASSWORD:-senzing}@db:5432:${POSTGRES_DB:-G2}/?sslmode=disable"
105
105
}
106
106
}
107
+ Q_URL : http://sqs.us-east-1.localhost.localstack.cloud:4566/000000000000/sqs-senzing-local-ingest
107
108
volumes :
108
109
# Note: `.aws` mount might not be needed later.
109
110
- ~/.aws:/home/senzing/.aws
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ ps -ef | grep $1 | grep -v grep
You can’t perform that action at this time.
0 commit comments