Skip to content

Commit

Permalink
Update docker-compose.yml & Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ygalnezri committed Jan 8, 2025
1 parent 390441e commit 6c62c8a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
25 changes: 15 additions & 10 deletions Watcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
FROM nikolaik/python-nodejs:python3.12-nodejs20
MAINTAINER Ygal NEZRI <[email protected]>
FROM nikolaik/python-nodejs:python3.11-nodejs18

LABEL title='Watcher' \
description='Watcher is a Django & React JS automated platform for discovering new potentially cybersecurity threats targeting your organisation.' \
documentation='https://thalesgroup-cert.github.io/Watcher/' \
source='https://github.com/thalesgroup-cert/Watcher' \
maintainer='[email protected]'

# Adding backend directory to make absolute filepaths consistent across services
WORKDIR /app/
# Add the rest of the code
COPY ./ /app/

# Install python-ldap dependencies
RUN apt-get update && apt-get install -y \
libsasl2-dev \
libldap2-dev \
libssl-dev
RUN apt-get update && apt-get install --no-install-recommends -y \
libsasl2-dev=2.1.28* \
libldap2-dev=2.5.13* \
libssl-dev=3.0.15* && \
rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip install -r requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Install nltk.tokenize dependencies
RUN python ./nltk_dependencies.py
Expand All @@ -25,7 +31,7 @@ RUN npm install
RUN cp ./wait-for-mysql.sh /tmp/ && cp ./wait_for_mysql.py /tmp/ && chmod u+x /tmp/wait-for-mysql.sh

# /app/Watcher : manage.py
WORKDIR Watcher/
WORKDIR /app/Watcher/

# Collect static files for production purpose
RUN python manage.py collectstatic
Expand All @@ -35,5 +41,4 @@ EXPOSE 9002

# Be sure to use 0.0.0.0 for the host within the Docker container,
# otherwise the browser won't be able to find it
CMD python manage.py runserver 0.0.0.0:9002

CMD ["python", "manage.py", "runserver", "0.0.0.0:9002"]
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ services:

watcher:
container_name: watcher
image: felix83000/watcher:latest
build:
context: ./Watcher/
dockerfile: Dockerfile
depends_on:
- db_watcher
- searx
Expand Down

0 comments on commit 6c62c8a

Please sign in to comment.