Skip to content

Commit eed403c

Browse files
committed
new version for dockerfile
Signed-off-by: pranjalg1331 <pranjaloff13@gmail.com>
1 parent acaa6c7 commit eed403c

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

integrations/nuclei_analyzer/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ EXPOSE 5000
2323
COPY entrypoint.sh /entrypoint.sh
2424
RUN chmod +x /entrypoint.sh
2525

26+
# RUN nuclei -update-template-dir /opt/nuclei-api/nuclei-templates -update-templates
27+
2628
ENTRYPOINT ["/entrypoint.sh"]

integrations/nuclei_analyzer/compose-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ services:
33
build:
44
context: ../integrations/nuclei_analyzer
55
dockerfile: Dockerfile
6-
image: pranjalg1310/nuclei-analyzer:3.0.3
6+
image: pranjalg1310/nuclei-analyzer:3.0.4

integrations/nuclei_analyzer/compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
services:
44
nuclei_analyzer:
5-
image: pranjalg1310/nuclei-analyzer:3.0.3
5+
image: pranjalg1310/nuclei-analyzer:3.0.4
66
container_name: nuclei_analyzer
77
restart: unless-stopped
88
expose:
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
#!/bin/sh
22

3-
# Update Nuclei templates
4-
nuclei -update-template-dir /opt/nuclei-api/nuclei-templates -update-templates
5-
sleep 60
63
TEMPLATES_DIR="/opt/nuclei-api/nuclei-templates"
74

8-
echo "Waiting for Nuclei templates to be available..."
5+
echo "Updating Nuclei templates..."
6+
nuclei -update-template-dir $TEMPLATES_DIR -update-templates
7+
8+
echo "Verifying Nuclei templates..."
99
while [ ! -d "$TEMPLATES_DIR" ] || [ -z "$(ls -A $TEMPLATES_DIR)" ]; do
10-
echo "Templates not found, retrying in 10 seconds..."
10+
echo "Templates not found or empty, retrying update in 10 seconds..."
11+
nuclei -update-template-dir $TEMPLATES_DIR -update-templates
1112
sleep 10
1213
done
1314

14-
echo "Templates downloaded successfully. Starting Flask app..."
15-
16-
# Start the Flask app
17-
exec gunicorn -b 0.0.0.0:4008 --timeout 120 --access-logfile - "app:app"
15+
echo "Templates downloaded successfully. Starting Flask API..."
16+
exec gunicorn -b 0.0.0.0:4008 --timeout 120 --access-logfile - "app:app"

0 commit comments

Comments
 (0)