-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More improvements to shibboleth docker setup
- Loading branch information
Dillon Lareau
committed
Feb 24, 2020
1 parent
1fc4b5d
commit 311f1f5
Showing
14 changed files
with
118 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ setup.cfg | |
/cover/ | ||
.coverage | ||
debug.log | ||
/docker/configs/certs/ | ||
/docker/configs/certs/ | ||
*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
FROM python:3.7 | ||
|
||
ENV PYTHONUNBUFFERED 1 | ||
ENV DJANGO_ENABLE_DEBUG False | ||
ENV DJANGO_USE_SHIBBOLETH False | ||
ENV DJANGO_SETTINGS_MODULE puzzlehunt_server.settings.env_settings | ||
|
||
RUN mkdir /code | ||
WORKDIR /code | ||
|
||
COPY requirements.txt /code/ | ||
|
||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt | ||
COPY . . | ||
|
||
COPY . /code/ | ||
|
||
EXPOSE 8000 | ||
EXPOSE 8000 | ||
CMD ["gunicorn", "--workers=2", "--bind=0.0.0.0:8000", "puzzlehunt_server.wsgi:application"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
FROM debian:10 | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y apache2 libapache2-mod-xsendfile | ||
RUN a2enmod proxy proxy_http proxy_html xsendfile | ||
RUN apt-get update && \ | ||
apt-get install -y apache2 libapache2-mod-xsendfile | ||
|
||
RUN rm /etc/apache2/sites-enabled/* | ||
|
||
COPY configs/puzzlehunt_apache.conf /etc/apache2/sites-available/puzzlehunt.conf | ||
|
||
RUN a2ensite puzzlehunt | ||
|
||
RUN mkdir -p /static | ||
RUN mkdir -p /media | ||
RUN rm /etc/apache2/sites-enabled/* && \ | ||
a2enmod proxy proxy_http proxy_html xsendfile && \ | ||
a2ensite puzzlehunt && \ | ||
mkdir -p /static && \ | ||
mkdir -p /media | ||
|
||
ENTRYPOINT ["/usr/sbin/apache2ctl"] | ||
CMD ["-D", "FOREGROUND"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<VirtualHost *:80> | ||
ServerName puzzlehunt.club.cc.cmu.edu | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html | ||
Redirect / https://puzzlehunt.club.cc.cmu.edu/ | ||
</VirtualHost> | ||
|
||
<IfModule mod_ssl.c> | ||
<VirtualHost *:443> | ||
ServerName puzzlehunt.club.cc.cmu.edu | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/html | ||
|
||
Alias /static /static | ||
<Directory /static> | ||
Require all granted | ||
</Directory> | ||
|
||
Alias /media /media | ||
Alias /media/puzzles /media/puzzles | ||
XSendFile On | ||
XSendFilePath /media | ||
<Directory /media> | ||
Require all granted | ||
</Directory> | ||
<Directory /media/puzzles> | ||
Require all denied | ||
</Directory> | ||
|
||
<Location /shib/> | ||
AuthType Shibboleth | ||
ShibUseHeaders On | ||
ShibRequireSession On | ||
ShibApplicationId default | ||
ShibExportAssertion On | ||
require valid-user | ||
</Location> | ||
|
||
<Location /Shibboleth.sso> | ||
Options +Indexes | ||
SetHandler shib | ||
</Location> | ||
|
||
ProxyPass /static/ ! | ||
ProxyPass /media/ ! | ||
ProxyPass /Shibboleth.sso/ ! | ||
|
||
ProxyPass / http://app:8000/ | ||
ProxyPassReverse / http://app:8000/ | ||
ProxyPreserveHost On | ||
|
||
SSLCertificateFile /etc/letsencrypt/live/puzzlehunt.club.cc.cmu.edu/fullchain.pem | ||
SSLCertificateKeyFile /etc/letsencrypt/live/puzzlehunt.club.cc.cmu.edu/privkey.pem | ||
Include /etc/letsencrypt/options-ssl-apache.conf | ||
</VirtualHost> | ||
</IfModule> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.