Docker removal
* remove docker from migration branch for dev purposes
This commit is contained in:
parent
26affafffa
commit
a633663e9d
24
Dockerfile
24
Dockerfile
@ -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
|
||||
|
@ -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
|
@ -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
|
@ -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
|
||||
|
@ -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"
|
||||
|
20
nginx.conf
20
nginx.conf
@ -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/;
|
||||
}
|
||||
|
||||
}
|
@ -50,4 +50,3 @@ webservices==0.7
|
||||
wrapt==1.13.3
|
||||
xmltodict==0.12.0
|
||||
zipp==3.4.1
|
||||
gunicorn==20.1.0
|
Loading…
Reference in New Issue
Block a user