diff --git a/.envs/.local/.django b/.envs/.local/.django index b1b81839..e7dc3102 100755 --- a/.envs/.local/.django +++ b/.envs/.local/.django @@ -7,6 +7,14 @@ IPYTHONDIR=/app/.ipython # ------------------------------------------------------------------------------ ALLOWED_HOSTS=* +# Smtp +# ------------------------------------------------------------------------------ +EMAIL_HOST=mailpit +EMAIL_PORT=1025 +EMAIL_USE_TLS=False +EMAIL_HOST_USER= +EMAIL_HOST_PASSWORD= + # Redis # ------------------------------------------------------------------------------ REDIS_URL=redis://redis:6379/0 diff --git a/compose/local/dask/Dockerfile b/compose/local/dask/Dockerfile index 3eb103c2..ae445f63 100644 --- a/compose/local/dask/Dockerfile +++ b/compose/local/dask/Dockerfile @@ -1,6 +1,5 @@ -FROM daskdev/dask:dev-py3.12 +FROM daskdev/dask:2024.2.1-py3.12 ENV DEBIAN_FRONTEND noninteractive -RUN echo "export VIRTUAL_ENV=`python -c 'import sys; print(sys.prefix)'`" >> /envfile ARG local_folder=/uploads @@ -48,7 +47,7 @@ RUN python setup.py build \ # Workers should have similar reqs as django WORKDIR / COPY ./requirements /requirements -RUN . /envfile && pip install uv==0.1.7 && uv pip install --no-cache -r /requirements/base.txt +RUN pip install uv==0.1.12 && uv pip install --system --no-cache -r /requirements/base.txt COPY ./compose/local/dask/prepare.sh /usr/bin/prepare.sh RUN chmod +x /usr/bin/prepare.sh diff --git a/compose/local/django/Dockerfile b/compose/local/django/Dockerfile index 4830290d..f47e5a21 100644 --- a/compose/local/django/Dockerfile +++ b/compose/local/django/Dockerfile @@ -3,7 +3,6 @@ FROM python:3.12-slim-bookworm as common-base ENV DJANGO_SETTINGS_MODULE config.settings.local ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 -RUN echo "export VIRTUAL_ENV=`python -c 'import sys; print(sys.prefix)'`" >> /envfile ARG local_folder=/uploads @@ -66,7 +65,7 @@ RUN /usr/local/go/bin/go build FROM common-base WORKDIR / COPY ./requirements /requirements -RUN . /envfile && pip install uv==0.1.7 && uv pip install --no-cache -r /requirements/base.txt +RUN pip install uv==0.1.12 && uv pip install --no-cache --system -r /requirements/base.txt COPY ./compose/local/__init__.py /src/volatility3/volatility3/framework/constants/__init__.py diff --git a/compose/local/nginx/conf/default.conf b/compose/local/nginx/conf/default.conf index 9000964a..7a105d90 100644 --- a/compose/local/nginx/conf/default.conf +++ b/compose/local/nginx/conf/default.conf @@ -14,12 +14,8 @@ map $http_upgrade $connection_upgrade { server { listen 80; listen [::]:80; - server_name orochi.dev; - location / { - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header Host $http_host; - proxy_pass http://django_wsgi; - } + server_name _; + return 301 https://$host$request_uri; } server { diff --git a/config/settings/local.py b/config/settings/local.py index ed6bdd56..da468de2 100644 --- a/config/settings/local.py +++ b/config/settings/local.py @@ -27,7 +27,7 @@ # EMAIL # ------------------------------------------------------------------------------ -EMAIL_HOST = env("EMAIL_HOST", default="mailhog") +EMAIL_HOST = env("EMAIL_HOST", default="mailpit") EMAIL_PORT = 1025 EMAIL_USE_TLS = env("EMAIL_USE_TLS", default=True) EMAIL_HOST_USER = env("EMAIL_HOST_USER", default=None) diff --git a/docker-compose.yml b/docker-compose.yml index 8bd1ceb7..25348c65 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: restart: always depends_on: - postgres - - mailhog + - mailpit volumes: - media_path:/media - symbols_path:/src/volatility3/volatility3/symbols @@ -73,7 +73,7 @@ services: restart: always depends_on: - postgres - - mailhog + - mailpit volumes: - media_path:/media - symbols_path:/src/volatility3/volatility3/symbols @@ -103,12 +103,13 @@ services: ports: - "5432:5432" - mailhog: - image: mailhog/mailhog:v1.0.1 - container_name: orochi_mailhog - hostname: mailhog + mailpit: + image: 'axllent/mailpit:latest' + container_name: orochi_mailpit + hostname: mailpit restart: always ports: + - "1025:1025" - "8025:8025" redis: diff --git a/orochi/templates/base.html b/orochi/templates/base.html index d4aa82c5..3762c03f 100644 --- a/orochi/templates/base.html +++ b/orochi/templates/base.html @@ -1,4 +1,4 @@ -{% load static i18n %} +{% load static i18n custom_tags %} @@ -36,23 +36,30 @@ {% if request.user.is_authenticated %}