File tree Expand file tree Collapse file tree 7 files changed +25
-8
lines changed Expand file tree Collapse file tree 7 files changed +25
-8
lines changed Original file line number Diff line number Diff line change 1+ [* ]
2+ end_of_line = lf
Original file line number Diff line number Diff line change 1- INITIAL_HOST = " 51.195.41.202" # gommehd.net
2- INITIAL_PORT = " 25565"
1+ TZ = " Europe/Berlin"
32LOCAL_PORT = " 1000"
3+
4+ INITIAL_HOST = " gommehd.net"
5+ # INITIAL_HOST="49.13.113.19"
6+ INITIAL_PORT = " 25565"
Original file line number Diff line number Diff line change @@ -21,17 +21,18 @@ docker run -p 25565:25565 -e INITIAL_HOST=<host> -e INITIAL_PORT=<port> vollborn
2121You can also use docker-compose.
2222Example docker-compose.yml:
2323``` yml
24- version : ' 3.1 '
24+ version : " 3.8 "
2525
2626services :
2727 proxy :
2828 image : vollborn/minecraft-nginx-reverse-proxy
2929 restart : unless-stopped
3030 ports :
31- - " 25565:25565"
31+ - " ${LOCAL_PORT:- 25565} :25565"
3232 environment :
3333 INITIAL_HOST : <host>
3434 INITIAL_PORT : <port>
35+ # TZ: "Europe/Berlin"
3536```
3637
3738Here we go.
Original file line number Diff line number Diff line change 1- version : ' 3.1 '
1+ version : " 3.8 "
22
33services :
44 proxy :
Original file line number Diff line number Diff line change 1- FROM debian:latest
1+ FROM debian:12
22
33LABEL maintainer="vollborn <oliver.vollborn@gmail.com>"
4- LABEL version="1.2.2 "
4+ LABEL version="1.3.0 "
55LABEL description="a simple nginx reverse proxy for minecraft servers"
66
7+ ENV TZ="Europe/Berlin"
8+
79ENV INITIAL_HOST=""
810ENV INITIAL_PORT=""
911
@@ -13,7 +15,7 @@ RUN apt-get update && apt-get -y upgrade && \
1315
1416WORKDIR /opt
1517
16- RUN wget https://nginx.org/download/nginx-1.23.4 .tar.gz && \
18+ RUN wget https://nginx.org/download/nginx-1.26.0 .tar.gz && \
1719 tar -zxvf nginx-1.*.tar.gz && \
1820 cd nginx-1.* && \
1921 ./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module --with-ipv6 --with-threads --with-stream --with-stream_ssl_module && \
@@ -34,6 +36,10 @@ ADD nginx.conf /opt/nginx/conf/nginx.conf
3436RUN chmod +x /opt/startup.sh
3537RUN chmod +x /opt/set_host.sh
3638
39+ RUN mkdir -p /var/log/nginx
40+ RUN ln -s /dev/stdout /var/log/nginx/access.log
41+ RUN ln -s /dev/stderr /var/log/nginx/error.log
42+
3743EXPOSE 25565
3844
3945CMD ["/opt/startup.sh" ]
Original file line number Diff line number Diff line change 11server {
22 listen 25565;
33 proxy_pass <host>:<port>;
4+
5+ access_log /var/log/nginx/access.log basic;
6+ error_log /var/log/nginx/error.log;
47}
Original file line number Diff line number Diff line change 66}
77
88stream {
9+ log_format basic '$remote_addr - $time_iso8601' ;
10+
911 include /opt/nginx/stream .conf.d/*.conf;
1012}
You can’t perform that action at this time.
0 commit comments