Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ENV DJANGO_SETTINGS_MODULE=intel_owl.settings
ENV PYTHONPATH=/opt/deploy/intel_owl
ENV LOG_PATH=/var/log/intel_owl
ARG REPO_DOWNLOADER_ENABLED=true
ENV WATCHMAN=false
ARG TARGETARCH
ENV watch_logs_cmd="watch -n1 tail -n10 /var/log/intel_owl/django/api_app.log"
# This is required to allow compatibility with different OpenCTI instances
Expand Down Expand Up @@ -50,15 +49,13 @@ RUN apt-get update \

COPY requirements/project-requirements.txt $PYTHONPATH/project-requirements.txt
COPY requirements/certego-requirements.txt $PYTHONPATH/certego-requirements.txt
COPY requirements/django-server-requirements.txt $PYTHONPATH/requirements/django-server-requirements.txt
WORKDIR $PYTHONPATH

RUN pip3 install --no-cache-dir --use-pep517 --compile -r project-requirements.txt \
&& pip3 install --no-cache-dir pycti==${PYCTI_VERSION} \
&& pip3 install --no-cache-dir --compile -r certego-requirements.txt

COPY api_app/analyzers_manager/repo_downloader.sh ${PYTHONPATH}/api_app/analyzers_manager/repo_downloader.sh
COPY docker/scripts/watchman_install.sh ${PYTHONPATH}/docker/scripts/watchman_install.sh

RUN touch ${LOG_PATH}/django/api_app.log ${LOG_PATH}/django/api_app_errors.log \
&& touch ${LOG_PATH}/django/intel_owl.log ${LOG_PATH}/django/intel_owl_errors.log \
Expand All @@ -68,8 +65,8 @@ RUN touch ${LOG_PATH}/django/api_app.log ${LOG_PATH}/django/api_app_errors.log \
&& touch ${LOG_PATH}/django/authentication.log ${LOG_PATH}/django/authentication_errors.log \
&& touch ${LOG_PATH}/asgi/daphne.log \
&& mkdir -p -m 755 ${PYTHONPATH}/.cache \
&& ${PYTHONPATH}/api_app/analyzers_manager/repo_downloader.sh \
&& ${PYTHONPATH}/docker/scripts/watchman_install.sh
# download github stuff
&& ${PYTHONPATH}/api_app/analyzers_manager/repo_downloader.sh

COPY . $PYTHONPATH

Expand Down
22 changes: 0 additions & 22 deletions docker/scripts/watchman_install.sh

This file was deleted.

2 changes: 0 additions & 2 deletions docker/test.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ services:
dockerfile: docker/Dockerfile
args:
REPO_DOWNLOADER_ENABLED: ${REPO_DOWNLOADER_ENABLED}
WATCHMAN: "true"
PYCTI_VERSION: ${PYCTI_VERSION:-6.8.8}
image: intelowlproject/intelowl:test
volumes:
- ../:/opt/deploy/intel_owl
environment:
- DEBUG=True
- DJANGO_TEST_SERVER=True
- DJANGO_WATCHMAN_TIMEOUT=60

daphne:
image: intelowlproject/intelowl:test
Expand Down
10 changes: 10 additions & 0 deletions intel_owl/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@
"django_extensions",
]

from .commons import DEBUG # noqa: E402

if DEBUG:
try:
import django_watchfiles # type: ignore[import]
except ImportError:
pass
else:
INSTALLED_APPS.append("django_watchfiles")

from .a_secrets import * # lgtm [py/polluting-import]
from .auth import * # lgtm [py/polluting-import]
from .aws import * # lgtm [py/polluting-import]
Expand Down
2 changes: 0 additions & 2 deletions requirements/django-server-requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements/project-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ django-silk==5.4.3
django-treebeard==4.7
django-solo==2.4.0
django_extensions==3.2.3
django-watchfiles==1.4.0
Comment thread
rootp1 marked this conversation as resolved.
jsonschema==4.25.1
# django rest framework libs
Authlib==1.6.5
Expand Down
Loading