diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6e35526c..00000000 --- a/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM python:3.9-slim -ENV PYTHONUNBUFFERED 1 - -WORKDIR /konova - -# Install some dependencies -RUN apt update -RUN apt install -y gdal-bin redis-server nginx - -# Copy requirements file into workspace and install all dependencies -COPY ./requirements.txt /konova/ -RUN pip install --upgrade pip -RUN pip install -r requirements.txt - -# Remove nginx default configuration and replace with own configuration -RUN rm /etc/nginx/sites-enabled/default -COPY ./nginx.conf /etc/nginx/conf.d - -# Copy rest of project into workspace -COPY . /konova/ - -# Move static files in designated folder -RUN python manage.py collectstatic --noinput - diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index c7bd3f4b..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: '3.3' - -services: - konova: - external_links: - - postgis:db - - arnova-nginx-server:arnova - build: . - container_name: "konova-docker" - command: ./docker-entrypoint.sh - restart: always - volumes: - - .:/konova - - /data/apps/konova/uploaded_files:/konova_uploaded_files - ports: - - "1337:80" - environment: - - POSTGRES_NAME=konova - - POSTGRES_PORT=5432 - - POSTGRES_PASSWORD=CHANGE_ME - - POSTGRES_USER=konova - - POSTGRES_HOST=db - - REDIS_HOST=localhost - - SSO_HOST=CHANGE_ME_TO_SSO_HOST_URL - - SMTP_HOST=172.17.0.1 - - SMTP_PORT=25 - - SMTP_REAL_REPLY_MAIL=ksp-servicestelle@sgdnord.rlp.de - -# Instead of an own, new network, we need to connect to the existing one, which is provided by the postgis container -# NOTE: THIS NETWORK MUST EXIST -networks: - default: - external: - name: postgis_nat_it_backend diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh deleted file mode 100755 index e9f2cea2..00000000 --- a/docker-entrypoint.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Start all needed services once the container is fired up! -service nginx start -service redis-server start -celery -A konova worker --detach -# Rule of thumb: (2*CPU)+1 as worker_num -> Use 5 as default (matches a dual core) -gunicorn --workers=5 konova.wsgi:application --bind=0.0.0.0:8000 \ No newline at end of file diff --git a/konova/sub_settings/django_settings.py b/konova/sub_settings/django_settings.py index 4f673467..39a3eafd 100644 --- a/konova/sub_settings/django_settings.py +++ b/konova/sub_settings/django_settings.py @@ -125,11 +125,10 @@ WSGI_APPLICATION = 'konova.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', - 'NAME': os.environ.get('POSTGRES_NAME'), - 'USER': os.environ.get('POSTGRES_USER'), - 'HOST': os.environ.get('POSTGRES_HOST'), - 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), - 'PORT': os.environ.get('POSTGRES_PORT'), + 'NAME': "konova", + 'USER': "postgres", + 'HOST': "127.0.0.1", + 'PORT': "5432", } } @@ -237,7 +236,11 @@ if DEBUG: DEFAULT_FROM_EMAIL = "no-reply@ksp.de" # The default email address for the 'from' element SERVER_EMAIL = DEFAULT_FROM_EMAIL # The default email sender address, which is used by Django to send errors via mail -EMAIL_HOST = os.environ.get('SMTP_HOST') -EMAIL_REPLY_TO = os.environ.get('SMTP_REAL_REPLY_MAIL') +EMAIL_HOST = "localhost" +EMAIL_REPLY_TO = "ksp-servicestelle@sgdnord.rlp.de" SUPPORT_MAIL_RECIPIENT = EMAIL_REPLY_TO -EMAIL_PORT = os.environ.get('SMTP_PORT') +EMAIL_PORT = "25" +#EMAIL_HOST_USER = "" +#EMAIL_HOST_PASSWORD = "" +EMAIL_USE_TLS = False +EMAIL_USE_SSL = False diff --git a/konova/sub_settings/sso_settings.py b/konova/sub_settings/sso_settings.py index 390ed403..f8f4f6df 100644 --- a/konova/sub_settings/sso_settings.py +++ b/konova/sub_settings/sso_settings.py @@ -9,7 +9,7 @@ Created on: 31.01.22 # SSO settings import os -SSO_SERVER_BASE = f"http://{os.environ.get('SSO_HOST')}/" +SSO_SERVER_BASE = f"http://127.0.0.1:8000/" SSO_SERVER = f"{SSO_SERVER_BASE}sso/" SSO_PRIVATE_KEY = "QuziFeih7U8DZvQQ1riPv2MXz0ZABupHED9wjoqZAqeMQaqkqTfxJDRXgSIyASwJ" SSO_PUBLIC_KEY = "AGGK7E8eT5X5u2GD38ygGG3GpAefmIldJiiWW7gldRPqCG1CzmUfGdvPSGDbEY2n" diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 373393a2..00000000 --- a/nginx.conf +++ /dev/null @@ -1,20 +0,0 @@ -upstream konova { - server localhost:8000; -} - -server { - - listen 80; - - location / { - proxy_pass http://konova; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_redirect off; - } - - location /static/ { - alias /konova/static/; - } - -} diff --git a/requirements.txt b/requirements.txt index f18586d7..4c9a500e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -49,5 +49,4 @@ wcwidth==0.2.5 webservices==0.7 wrapt==1.13.3 xmltodict==0.12.0 -zipp==3.4.1 -gunicorn==20.1.0 \ No newline at end of file +zipp==3.4.1 \ No newline at end of file