diff --git a/minecraft/Dockerfile b/minecraft/Dockerfile index e4479d7..971a11c 100644 --- a/minecraft/Dockerfile +++ b/minecraft/Dockerfile @@ -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"] diff --git a/minecraft/docker-compose.yml b/minecraft/docker-compose.yml index 9feb9ec..f23dff7 100644 --- a/minecraft/docker-compose.yml +++ b/minecraft/docker-compose.yml @@ -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 \ No newline at end of file + - 25565:25565 + - 8123:8123 \ No newline at end of file diff --git a/minecraft/docker-entrypoint.sh b/minecraft/docker-entrypoint.sh index 21cb9d3..2710ee1 100644 --- a/minecraft/docker-entrypoint.sh +++ b/minecraft/docker-entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/bash envsubst /minecraft/server.properties cd /minecraft -java -Xms3G -Xmx3G -jar server.jar nogui +java -Xms4G -Xmx4G -jar server.jar nogui diff --git a/minecraft/server.template.properties b/minecraft/server.template.properties index 472e6ef..0e46813 100644 --- a/minecraft/server.template.properties +++ b/minecraft/server.template.properties @@ -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= diff --git a/minecraft/start.yml b/minecraft/start.yml index e84aa49..8698ab4 100644 --- a/minecraft/start.yml +++ b/minecraft/start.yml @@ -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" \ No newline at end of file diff --git a/nextcloud/docker-compose.yml b/nextcloud/docker-compose.yml index f70dc97..8d57f19 100644 --- a/nextcloud/docker-compose.yml +++ b/nextcloud/docker-compose.yml @@ -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" diff --git a/nginx/playbook-nginx.yml b/nginx/playbook-nginx.yml index be64840..2315a24 100644 --- a/nginx/playbook-nginx.yml +++ b/nginx/playbook-nginx.yml @@ -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: diff --git a/nginx/sites/mcmap b/nginx/sites/mcmap new file mode 100644 index 0000000..244eb91 --- /dev/null +++ b/nginx/sites/mcmap @@ -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"; + } +} \ No newline at end of file diff --git a/nginx/sites/mcmap-euforward b/nginx/sites/mcmap-euforward new file mode 100644 index 0000000..48cdb7a --- /dev/null +++ b/nginx/sites/mcmap-euforward @@ -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; +} \ No newline at end of file diff --git a/nginx/sites/nextcloud b/nginx/sites/nextcloud index 6cb1a6b..277992c 100644 --- a/nginx/sites/nextcloud +++ b/nginx/sites/nextcloud @@ -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/; diff --git a/nginx/sites/nextcloud-euforward b/nginx/sites/nextcloud-euforward new file mode 100644 index 0000000..c9a9495 --- /dev/null +++ b/nginx/sites/nextcloud-euforward @@ -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; +} \ No newline at end of file diff --git a/nginx/sites/nummus b/nginx/sites/nummus index b479f21..aa027ed 100644 --- a/nginx/sites/nummus +++ b/nginx/sites/nummus @@ -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; diff --git a/nginx/sites/website b/nginx/sites/website index c7352c4..aefce12 100644 --- a/nginx/sites/website +++ b/nginx/sites/website @@ -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; diff --git a/nginx/sites/website-euforward b/nginx/sites/website-euforward new file mode 100644 index 0000000..33cd7b2 --- /dev/null +++ b/nginx/sites/website-euforward @@ -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; +} \ No newline at end of file