mirror of
https://github.com/tomet123/LuckPermsWeb-docker.git
synced 2024-11-28 12:35:37 +01:00
add bytesocks
This commit is contained in:
parent
f1e4c596a5
commit
897d30ba22
12
Dockerfile
12
Dockerfile
@ -1,7 +1,7 @@
|
||||
FROM alpine:3.16
|
||||
|
||||
# configure supervisord
|
||||
RUN apk add --update supervisor openjdk17-jdk parallel nginx nodejs npm git && rm -rf /tmp/* /var/cache/apk/*
|
||||
RUN apk add --update supervisor openjdk17-jdk parallel nginx nodejs npm git maven && rm -rf /tmp/* /var/cache/apk/*
|
||||
ADD supervisord.conf /etc/
|
||||
|
||||
#configure bytebin
|
||||
@ -10,14 +10,22 @@ ADD https://ci.lucko.me/job/bytebin/lastSuccessfulBuild/artifact/target/bytebin.
|
||||
ADD services/bytebin/config.json /opt/bytebin/config.json
|
||||
ADD services/bytebin/bytebin-service.conf /etc/supervisor/conf.d/bytebin-service.conf
|
||||
|
||||
#configure bytesocks
|
||||
RUN mkdir /opt/bytesocks
|
||||
RUN git clone --recursive https://github.com/lucko/bytesocks.git /tmp/bytesocks
|
||||
RUN cd /tmp/bytesocks && mvn --no-transfer-progress -B package && cp /tmp/bytesocks/target/bytesocks*.jar /opt/bytesocks/bytesocks.jar && rm -rf /tmp/bytesocks
|
||||
ADD services/bytesocks/config.json /opt/bytesocks/config.json
|
||||
ADD services/bytesocks/bytesocks-service.conf /etc/supervisor/conf.d/bytesocks-service.conf
|
||||
|
||||
#configure nginx
|
||||
ADD services/nginx/nginx-service.conf /etc/supervisor/conf.d/nginx-service.conf
|
||||
ADD services/nginx/nginx.conf /etc/nginx/http.d/web.conf
|
||||
|
||||
|
||||
#configure luckperms web
|
||||
RUN git clone --recursive https://github.com/lucko/LuckPermsWeb.git /opt/LuckPermsWeb && rm -rf /opt/LuckPermsWeb/config.json
|
||||
ADD services/luckpermsweb/config.json /opt/LuckPermsWeb/config.json
|
||||
RUN mkdir -p /opt/web && cd /opt/LuckPermsWeb && npm install && npm run build && cp -r dist/* /opt/web && rm -rf /opt/LuckPermsWeb
|
||||
|
||||
RUN apk del nodejs npm git maven && rm -rf /tmp/* /var/cache/apk/*
|
||||
|
||||
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
|
||||
|
7
services/bytesocks/bytesocks-service.conf
Normal file
7
services/bytesocks/bytesocks-service.conf
Normal file
@ -0,0 +1,7 @@
|
||||
[program:bytesocks]
|
||||
command=/usr/bin/java -jar bytesocks.jar
|
||||
directory=/opt/bytesocks
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/bytesocks.err.log
|
||||
stdout_logfile=/var/log/bytesocks.out.log
|
4
services/bytesocks/config.json
Normal file
4
services/bytesocks/config.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"host": "127.0.0.1",
|
||||
"port": 8086
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"bytebin_url": "../bytebin/",
|
||||
"bytesocks_host": "usersockets.luckperms.net",
|
||||
"bytesocks_host": "../bytesock/",
|
||||
"base": "/",
|
||||
"selfHosted": true,
|
||||
"api_url": "https://metadata.luckperms.net"
|
||||
|
@ -10,7 +10,7 @@ server {
|
||||
|
||||
|
||||
location = /bytebin {
|
||||
return 302 /luckperms/bytebin/;
|
||||
return 302 /bytebin/;
|
||||
}
|
||||
|
||||
location /bytebin/ {
|
||||
@ -26,4 +26,24 @@ server {
|
||||
proxy_pass http://127.0.0.1:8085/;
|
||||
}
|
||||
|
||||
location = /bytesocks {
|
||||
return 302 /bytesocks/;
|
||||
}
|
||||
|
||||
location /bytesocks/ {
|
||||
client_max_body_size 30M;
|
||||
client_body_timeout 60s;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_redirect http:// https://;
|
||||
|
||||
proxy_pass http://127.0.0.1:8086/;
|
||||
}
|
||||
|
||||
}
|
@ -3,7 +3,7 @@ nodaemon=true
|
||||
|
||||
|
||||
[program:logging]
|
||||
command=parallel --tagstring "{}:" --line-buffer tail -f {} ::: /var/log/bytebin.out.log /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
command=parallel --tagstring "{}:" --line-buffer tail -f {} ::: /var/log/bytebin.out.log /var/log/bytesocks.out.log /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
user=root
|
||||
directory=/root/
|
||||
priority=40
|
||||
|
Loading…
Reference in New Issue
Block a user