From b54fe6bbba1d8cc31937c812a7b48842ff1290df Mon Sep 17 00:00:00 2001
From: hankhill19580 <hankhill19580@gmail.com>
Date: Wed, 23 Sep 2020 23:32:55 +0000
Subject: [PATCH] check in docker specific wsgi file

---
 Dockerfile          | 6 +++---
 etc/docker.wsgi.i2p | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)
 create mode 100644 etc/docker.wsgi.i2p

diff --git a/Dockerfile b/Dockerfile
index 06c2d5eec..02f5b73fc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,6 +10,7 @@ WORKDIR /var/www/i2p.www
 RUN apt-get update && \
     apt-get -y install apache2 apache2-utils libapache2-mod-wsgi python2-dev python-pip patch python-virtualenv git && \
     ## Start setting up the site
+    rm -rfv env && \
     virtualenv --distribute env                && \  
     . env/bin/activate                          && \
     pip install -r etc/reqs.txt                 && \
@@ -19,7 +20,7 @@ RUN apt-get update && \
     ## We've now updated the site
     ## Next let's configure WSGI
     ## Set ownership of site to server
-    cp etc/docker.i2p.wsgi i2p.wsgi && \
+    cp etc/docker.wsgi.i2p i2p.wsgi && \
     chown -R www-data /var/www/i2p.www                    && \ 
     ## Make the WSGI script owned by the server 
     chown www-data:www-data /var/www/i2p.www/i2p.wsgi     && \  
@@ -31,7 +32,6 @@ RUN apt-get update && \
     a2ensite i2p && \
     ls /etc/apache2 && \
     sed -i 's|IncludeOptional sites-enabled|# IncludeOptional sites-enabled|g' /etc/apache2/apache2.conf && \
-    sed -i '1 i\IncludeOptional sites-enabled/i2p.conf' /etc/apache2/apache2.conf && \
-    cat /etc/apache2/apache2.conf
+    sed -i '1 i\IncludeOptional sites-enabled/i2p.conf' /etc/apache2/apache2.conf
 
 CMD service apache2 restart && tail -f /var/log/apache2/access.log
diff --git a/etc/docker.wsgi.i2p b/etc/docker.wsgi.i2p
new file mode 100644
index 000000000..d1c83c074
--- /dev/null
+++ b/etc/docker.wsgi.i2p
@@ -0,0 +1,5 @@
+import sys
+activate_this = '/var/www/i2p.www/env/bin/activate_this.py'
+execfile(activate_this, dict(__file__=activate_this))
+sys.path.insert(0, '/var/www/i2p.www')
+from i2p2www import app as application
-- 
GitLab