diff --git a/oe-stundenplan/Dockerfile b/oe-stundenplan/Dockerfile deleted file mode 100644 index d0b80b4..0000000 --- a/oe-stundenplan/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM debian:bullseye AS base - -ARG STUNDENPLAN_PATH=./oe-stundenplan - -# Install normal dependencies -RUN apt-get update -RUN apt-get -y --no-install-recommends install 'g++' gcc make wget uwsgi uwsgi-plugin-python3 python3 libldap2-dev libsasl2-dev libssl-dev python3-dev python3-pip python3-setuptools nginx -RUN pip3 install wheel - -# Add project code to container -ADD $STUNDENPLAN_PATH/stundenplan-backend /app/backend - -# Setup backend -RUN pip3 install uWSGI -RUN pip3 install -r /app/backend/requirements.txt - -FROM node:18 AS frontend - -# Build frontend -ARG STUNDENPLAN_PATH=./oe-stundenplan -ADD $STUNDENPLAN_PATH/stundenplan-frontend /app/frontend -WORKDIR /app/frontend -RUN npm install -RUN npm run build - -FROM base AS final -COPY --from=frontend /app/frontend/build /app/static -ADD start.sh /usr/local/bin/run -ADD uwsgi-stundenplan.ini /etc/uwsgi/stundenplan.ini -ADD nginx.conf /etc/nginx/sites-enabled/default - -RUN usermod -u 2009 -g 33 -d /app/backend www-data - -ENV STUNDENPLAN_STATIC=/app/static/static - -#USER www-data:www-data -CMD /usr/local/bin/run - diff --git a/oe-stundenplan/nginx.conf b/oe-stundenplan/nginx.conf deleted file mode 100644 index 8438094..0000000 --- a/oe-stundenplan/nginx.conf +++ /dev/null @@ -1,24 +0,0 @@ -# vim: set filetype=conf: - -server { - listen 80; - server_name default_server; - - try_files $uri /index.html; - root /app/static; - - location /api { - include uwsgi_params; - uwsgi_pass 127.0.0.1:3008; - } - - location /auth { - include uwsgi_params; - uwsgi_pass 127.0.0.1:3008; - } - - location /admin { - include uwsgi_params; - uwsgi_pass 127.0.0.1:3008; - } -} diff --git a/oe-stundenplan/start.sh b/oe-stundenplan/start.sh deleted file mode 100755 index ef89a2b..0000000 --- a/oe-stundenplan/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -e -export USER=www-data -export HOME=/home/www-data - -# Migrate database and deploy staticfiles -python3 /app/backend/manage.py migrate -python3 /app/backend/manage.py collectstatic --noinput - -# Start backend with uWSGI -nginx -exec uwsgi /etc/uwsgi/stundenplan.ini - diff --git a/oe-stundenplan/uwsgi-stundenplan.ini b/oe-stundenplan/uwsgi-stundenplan.ini deleted file mode 100644 index cea7961..0000000 --- a/oe-stundenplan/uwsgi-stundenplan.ini +++ /dev/null @@ -1,33 +0,0 @@ -[uwsgi] - -procname-master = uwsgi %n -master = true -socket = :3008 - -plugins = python3 - -chdir = /app/backend - -#home = /opt/tauschen/tauschen-backend/.pyenv -module = backend.wsgi:application -#env = DJANGO_SETTINGS_MODULE=tauschen.settings -env = LANG='C.UTF-8' -env = LC_ALL='C.UTF-8' - -; drop privileges -uid = www-data -gid = www-data -umask = 027 - -; run with at least 2 process but increase up to 8 when needed -processes = 8 -cheaper = 2 - -; reload whenever this config file changes -; %p is the full path of the current config file -touch-reload = %p - -; disable uWSGI request logging -disable-logging = true - -enable-threads = true