-
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.
Start of development for production dockerfile
- Loading branch information
Showing
5 changed files
with
26 additions
and
11 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 |
---|---|---|
|
@@ -13,4 +13,5 @@ db.sqlite3 | |
setup.cfg | ||
/cover/ | ||
.coverage | ||
debug.log | ||
debug.log | ||
/docker/configs/certs/ |
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,27 +1,30 @@ | ||
FROM debian:10 | ||
|
||
RUN apt update | ||
RUN apt install -y apache2 gnupg curl ntp | ||
RUN apt-get update | ||
RUN apt-get install -y apache2 gnupg curl ntp | ||
RUN cd /tmp | ||
RUN curl --fail --remote-name https://pkg.switch.ch/switchaai/debian/dists/buster/main/binary-all/misc/switchaai-apt-source_1.0.0_all.deb | ||
RUN apt install ./switchaai-apt-source_1.0.0_all.deb | ||
RUN apt-get install -y ./switchaai-apt-source_1.0.0_all.deb | ||
RUN rm ./switchaai-apt-source_1.0.0_all.deb | ||
RUN apt update | ||
RUN apt install --install-recommends shibboleth | ||
RUN apt install libapache2-mod-xsendfile libapache2-mod-shib | ||
RUN apt-get update | ||
RUN apt-get install -y --install-recommends shibboleth | ||
RUN apt-get install -y libapache2-mod-xsendfile libapache2-mod-shib | ||
RUN a2enmod proxy proxy_http proxy_html xsendfile shib | ||
|
||
RUN rm /etc/apache2/sites-enabled/* | ||
|
||
COPY configs/puzzlehunt_apache.conf /etc/apache2/sites-available/puzzlehunt.conf | ||
COPY configs/certs/sp-cert.pem /etc/shibboleth/sp-cert.pem | ||
COPY configs/certs/sp-key.pem /etc/shibboleth/sp-key.pem | ||
COPY --chown=_shibd:_shibd configs/certs/sp-cert.pem /etc/shibboleth/sp-cert.pem | ||
COPY --chown=_shibd:_shibd configs/certs/sp-key.pem /etc/shibboleth/sp-key.pem | ||
RUN chmod 644 /etc/shibboleth/sp-* | ||
COPY configs/shibboleth2.xml /etc/shibboleth/shibboleth2.xml | ||
|
||
RUN a2ensite puzzlehunt | ||
|
||
RUN mkdir -p /static | ||
RUN mkdir -p /media | ||
|
||
ENTRYPOINT ["/usr/sbin/apache2ctl"] | ||
CMD ["-D", "FOREGROUND"] | ||
COPY apacheShibForeground /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/apacheShibForeground | ||
|
||
CMD ["/usr/local/bin/apacheShibForeground"] |
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,7 @@ | ||
#!/bin/bash | ||
|
||
rm -f /etc/apache2/run/httpd.pid /var/lock/subsys/shibd | ||
|
||
service shibd start | ||
|
||
exec /usr/sbin/apache2ctl -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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
version: '3' | ||
|
||
services: | ||
web: | ||
build: | ||
dockerfile: apacheShibDockerfile |