This commit is contained in:
Florens Pauwels 2024-03-20 16:45:49 -06:00 committed by GitHub
commit e383be93db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 99 additions and 0 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
.dockerignore
.git
.gitattributes
.github
.gitignore
Dockerfile
README.md

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:2-alpine
RUN apk add --no-cache musl-dev gcc
RUN pip install twisted
COPY . /app
WORKDIR /app
ENTRYPOINT ["python", "master_server.py"]

14
docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: '3'
services:
backend:
build:
context: .
network_mode: "host"
proxy:
build:
context: tools/docker/apache-hosts
# environment:
# - DWC_HOST=example.com
network_mode: "host"

View File

@ -0,0 +1,19 @@
FROM httpd:2.4-alpine
ENV APACHE_LOG_DIR=/usr/local/apache2/logs
# Change this if you have your own domain name set up
# Otherwise, you will need to set up a DNS server to point nintendowifi.net to your IP address
ENV DWC_HOST=nintendowifi.net
# vhost config
RUN echo $'IncludeOptional /usr/local/apache2/vhost.d/*.conf\n\
ServerName localhost\n\
HttpProtocolOptions Unsafe' >> conf/httpd.conf
# Enable proxy module
RUN sed -i 's/^#LoadModule proxy_module/LoadModule proxy_module/' conf/httpd.conf
RUN sed -i 's/^#LoadModule proxy_http_module/LoadModule proxy_http_module/' conf/httpd.conf
# Copy vhosts
COPY *.conf vhost.d/

View File

@ -0,0 +1,9 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName dls1.${DWC_HOST}
ServerAlias "dls1.${DWC_HOST}"
ServerAlias "dls1.${DWC_HOST}, dls1.${DWC_HOST}"
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9003/
ProxyPassReverse / http://127.0.0.1:9003/
</VirtualHost>

View File

@ -0,0 +1,8 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName gamestats.gs.${DWC_HOST}
ServerAlias "gamestats.gs.${DWC_HOST}, gamestats.gs.${DWC_HOST}"
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9002/
ProxyPassReverse / http://127.0.0.1:9002/
</VirtualHost>

View File

@ -0,0 +1,10 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName gamestats2.gs.${DWC_HOST}
ServerAlias "gamestats2.gs.${DWC_HOST}, gamestats2.gs.${DWC_HOST}"
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9002/
ProxyPassReverse / http://127.0.0.1:9002/
</VirtualHost>

View File

@ -0,0 +1,12 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName naswii.${DWC_HOST}
ServerAlias "naswii.${DWC_HOST}, naswii.${DWC_HOST}"
ServerAlias "nas.${DWC_HOST}"
ServerAlias "nas.${DWC_HOST}, nas.${DWC_HOST}"
ServerAlias "conntest.${DWC_HOST}"
ServerAlias "conntest.${DWC_HOST}, conntest.${DWC_HOST}"
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
</VirtualHost>

View File

@ -0,0 +1,11 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName sake.gs.${DWC_HOST}
ServerAlias sake.gs.${DWC_HOST} *.sake.gs.${DWC_HOST}
ServerAlias secure.sake.gs.${DWC_HOST}
ServerAlias secure.sake.gs.${DWC_HOST} *.secure.sake.gs.${DWC_HOST}
ProxyPass / http://127.0.0.1:8000/
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>