I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 97a6a80a authored by idk's avatar idk
Browse files

Enable the use of Docker+Apache2 to host the site, HTTP only. HTTPS sites...

Enable the use of Docker+Apache2 to host the site, HTTP only. HTTPS sites should use a reverse proxy
parent 4a3c4933
No related branches found
No related tags found
No related merge requests found
FROM debian:stable
ENV SERVERNAME=geti2p.net
ENV SERVERMAIL=example@geti2p.net
ADD . /var/www/i2p.www
WORKDIR /var/www/i2p.www
## Install the dependencies
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
virtualenv --distribute env && \
. env/bin/activate && \
pip install -r etc/reqs.txt && \
patch -p0 -N -r - <etc/multi-domain.patch && \
./compile-messages.sh && \
echo "Git revision: $(git log -n 1 | grep commit | sed 's/commit //' | sed 's/ .*$//')" | tee ./i2p2www/pages/include/mtnversion && \
## We've now updated the site
## Next let's configure WSGI
## Set ownership of site to server
cp etc/docker.i2p.wsgi 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 && \
## Make the WSGI script executable
chmod 755 /var/www/i2p.www/i2p.wsgi && \
## Copy the unmodified vhosts file to the apache2 confdir
cp etc/apache2.i2p.conf /etc/apache2/sites-available/i2p.conf && \
a2enmod wsgi && \
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
CMD service apache2 restart && tail -f /var/log/apache2/access.log
...@@ -7,7 +7,7 @@ To run locally (for testing purposes): ...@@ -7,7 +7,7 @@ To run locally (for testing purposes):
- Pull in the dependencies: - Pull in the dependencies:
``` ```
$ proxychains ./setup_venv.sh $ proxychains ./setup_venv.qsh
``` ```
(you can also pull them non-anon by leaving out proxychains) (you can also pull them non-anon by leaving out proxychains)
......
<VirtualHost *:80>
#change ServerName and ServerAdmin to your own.
ServerName www.geti2p.net
ServerAdmin example@geti2p.net
DocumentRoot /var/www/i2p.www
WSGIDaemonProcess i2p2www user=www-data group=www-data threads=2
WSGIScriptAlias / /var/www/i2p.www/i2p.wsgi
<Directory /var/www/i2p.www/>
WSGIProcessGroup i2p2www
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
#! /usr/bin/env sh
git pull origin master
docker build -t i2p-mirror/i2p.www .
docker rm -f mirror.i2p.www
docker run -it --name mirror.i2p.www -p 0.0.0.0:8090:80 i2p-mirror/i2p.www
#docker run -td --name mirror.i2p.www --restart=always -p 0.0.0.0:5000:5000 i2p-mirror/i2p.www
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment