Switch to teier.net Domain

This commit is contained in:
Mathias Teier 2021-04-12 11:14:55 +02:00
parent a219b17996
commit 10bdaa2402
No known key found for this signature in database
GPG Key ID: 8CE851A755C27766
14 changed files with 121 additions and 23 deletions

View File

@ -9,4 +9,5 @@ COPY ./docker-entrypoint.sh /minecraft/
COPY ./eula.txt /minecraft/
COPY ./server.template.properties /minecraft/
EXPOSE 25565
EXPOSE 8123
ENTRYPOINT ["/bin/bash", "/minecraft/docker-entrypoint.sh"]

View File

@ -6,10 +6,16 @@ services:
restart: unless-stopped
volumes:
- /var/minecraft/world:/minecraft/world
- /var/minecraft/world_nether:/minecraft/world_nether
- /var/minecraft/world_the_end:/minecraft/world_the_end
- /var/minecraft/ops.json:/minecraft/ops.json
- /var/minecraft/whitelist.json:/minecraft/whitelist.json
- /var/minecraft/banned-players.json:/minecraft/banned-player.json
- /var/minecraft/banned-ips.json:/minecraft/banned-ips.json
- /var/minecraft/permissions.yml:/minecraft/permissions.yml
- /var/minecraft/plugins:/minecraft/plugins
- /var/minecraft/bukkit.yml:/minecraft/bukkit.yml
- /var/minecraft/spigot.yml:/minecraft/spigot.yml
environment:
PORT: "25565"
ENABLE_COMMAND_BLOCK: "true"
@ -18,5 +24,8 @@ services:
DIFFICULTY: "easy"
MAX_PLAYERS: "20"
ENABLED_WHITELIST: "true"
ONLINE_MODE: "true"
RESOURCE_PACK: "http://mc.teier.net/ovos.zip"
ports:
- 25565:25565
- 25565:25565
- 8123:8123

View File

@ -1,4 +1,4 @@
#!/bin/bash
envsubst </minecraft/server.template.properties >/minecraft/server.properties
cd /minecraft
java -Xms3G -Xmx3G -jar server.jar nogui
java -Xms4G -Xmx4G -jar server.jar nogui

View File

@ -15,7 +15,7 @@ network-compression-threshold=256
max-tick-time=60000
max-players=${MAX_PLAYERS}
use-native-transport=true
online-mode=true
online-mode=${ONLINE_MODE}
enable-status=true
allow-flight=false
broadcast-rcon-to-ops=true
@ -28,7 +28,7 @@ enable-rcon=false
sync-chunk-writes=true
op-permission-level=4
prevent-proxy-connections=false
resource-pack=
resource-pack=${RESOURCE_PACK}
entity-broadcast-range-percentage=100
player-idle-timeout=0
rcon.password=

View File

@ -47,5 +47,5 @@
dest: /dc/minecraft/
- name: Start minecraft
shell: "cd /dc/minecraft && docker-compose up -d"
shell: "cd /dc/minecraft && docker-compose up -d --build"

View File

@ -15,9 +15,9 @@ services:
POSTGRES_USER: nextcloud
POSTGRES_HOST: postgres
POSTGRES_PASSWORD: ${POSTGRES_DB_PASSWORD}
TRUSTED_PROXIES: "cloud.teier.eu 138.201.74.231 172.0.0.1/8"
TRUSTED_PROXIES: "cloud.teier.net 138.201.74.231 172.0.0.1/8"
APACHE_DISABLE_REWRITE_IP: "1"
OVERWRITEHOST: "cloud.teier.eu"
OVERWRITEHOST: "cloud.teier.net"
OVERWRITEPROTOCOL: "https"
OVERWRITEWEBROOT: "/"
OVERWRITECONADDR: "138.201.74.231"

View File

@ -20,7 +20,7 @@
shell: "rm -f /etc/nginx/sites-enabled/*"
- name: Get Certificate
shell: certbot certonly --standalone --preferred-challenges http -m mathias.teier@icloud.com --agree-tos -n -d teier.eu -d cloud.teier.eu -d nummus.teier.eu -d www.teier.eu -d collabora.teier.eu -d matrix.teier.eu -d kagent.at -d www.kagent.at -d git.kagent.at
shell: certbot certonly --standalone --preferred-challenges http -m mathias.teier@icloud.com --agree-tos -n -d teier.eu -d cloud.teier.eu -d nummus.teier.eu -d www.teier.eu -d collabora.teier.eu -d matrix.teier.eu -d kagent.at -d www.kagent.at -d git.kagent.at -d mc.teier.eu
- name: Install nginx server config
copy:

40
nginx/sites/mcmap Normal file
View File

@ -0,0 +1,40 @@
server {
listen 80;
server_name mc.teier.net;
location / {
return 301 https://mc.teier.net:443$request_uri;
}
location /ovos.zip {
alias /var/www/html/mc/ovos.zip;
}
}
server {
listen 443 ssl http2;
server_name mc.teier.net;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8123/;
# Configuration for WebSockets
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_cache off;
# Configuration for ServerSentEvents
proxy_buffering off;
# Configuration for LongPolling or if your KeepAliveInterval is longer than 60 seconds
proxy_read_timeout 100s;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options "SAMEORIGIN";
}
}

View File

@ -0,0 +1,16 @@
server {
listen 80;
server_name mc.teier.eu;
return 301 https://mc.teier.net:443$request_uri;
}
server {
listen 443 ssl http2;
server_name mc.teier.eu;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
return 301 https://mc.teier.net:443$request_uri;
}

View File

@ -1,16 +1,16 @@
server {
listen 80;
server_name cloud.teier.eu;
return 301 https://cloud.teier.eu:443$request_uri;
server_name cloud.teier.net;
return 301 https://cloud.teier.net:443$request_uri;
}
server {
listen 443 ssl http2;
server_name cloud.teier.eu;
server_name cloud.teier.net;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem;
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8081/;

View File

@ -0,0 +1,16 @@
server {
listen 80;
server_name cloud.teier.eu;
return 301 https://cloud.teier.net:443$request_uri;
}
server {
listen 443 ssl http2;
server_name cloud.teier.eu;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem;
return 301 https://cloud.teier.net:443$request_uri;
}

View File

@ -1,17 +1,17 @@
server {
listen 80;
server_name nummus.teier.eu;
server_name nummus.teier.net;
return 301 https://$server_name:443$request_uri;
}
server {
listen 443;
server_name nummus.teier.eu;
server_name nummus.teier.net;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
location / {
proxy_pass http://127.0.0.1:8082;

View File

@ -1,19 +1,19 @@
server {
listen 80;
server_name teier.eu www.teier.eu;
return 301 https://www.teier.eu:443$request_uri;
server_name teier.net www.teier.net;
return 301 https://www.teier.net:443$request_uri;
}
server {
listen 443 ssl http2;
server_name teier.eu www.teier.eu;
server_name teier.net www.teier.net;
root /var/www/html/website;
index index.html;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem;
ssl_certificate /etc/letsencrypt/live/teier.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.net/privkey.pem;
location / {
try_files $uri $uri/ =404;

View File

@ -0,0 +1,16 @@
server {
listen 80;
server_name teier.eu www.teier.eu;
return 301 https://www.teier.net:443$request_uri;
}
server {
listen 443 ssl http2;
server_name teier.eu www.teier.eu;
ssl on;
ssl_certificate /etc/letsencrypt/live/teier.eu/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/teier.eu/privkey.pem;
return 301 https://www.teier.net:443$request_uri;
}