partialy working
This commit is contained in:
commit
d4d16d1bd5
|
@ -0,0 +1,23 @@
|
|||
FROM alpine:3.16
|
||||
|
||||
# configure supervisord
|
||||
RUN apk add --update supervisor openjdk17-jdk parallel nginx nodejs npm git && rm -rf /tmp/* /var/cache/apk/*
|
||||
ADD supervisord.conf /etc/
|
||||
|
||||
#configure bytebin
|
||||
RUN mkdir /opt/bytebin
|
||||
ADD https://ci.lucko.me/job/bytebin/lastSuccessfulBuild/artifact/target/bytebin.jar /opt/bytebin
|
||||
ADD services/bytebin/config.json /opt/bytebin/config.json
|
||||
ADD services/bytebin/bytebin-service.conf /etc/supervisor/conf.d/bytebin-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
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
ENTRYPOINT ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
services:
|
||||
lpweb:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
|
@ -0,0 +1,7 @@
|
|||
[program:bytebin]
|
||||
command=/usr/bin/java -jar bytebin.jar
|
||||
directory=/opt/bytebin
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/bytebin.err.log
|
||||
stdout_logfile=/var/log/bytebin.out.log
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"host": "127.0.0.1",
|
||||
"port": 8085,
|
||||
"keyLength": 10,
|
||||
"lifetimeMinutes": 10080,
|
||||
"maxContentLengthMb": 10
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"bytebin_url": "../bytebin/",
|
||||
"bytesocks_host": "usersockets.luckperms.net",
|
||||
"base": "/",
|
||||
"selfHosted": true,
|
||||
"api_url": "https://metadata.luckperms.net"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
[program:nginx]
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startretries=5
|
|
@ -0,0 +1,29 @@
|
|||
server {
|
||||
listen 0.0.0.0:8080;
|
||||
server_name default_server;
|
||||
|
||||
client_max_body_size 0;
|
||||
|
||||
root /opt/web;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
|
||||
location = /bytebin {
|
||||
return 302 /luckperms/bytebin/;
|
||||
}
|
||||
|
||||
location /bytebin/ {
|
||||
client_max_body_size 30M;
|
||||
client_body_timeout 60s;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
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_redirect http:// https://;
|
||||
|
||||
proxy_pass http://127.0.0.1:8085/;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
[supervisord]
|
||||
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
|
||||
user=root
|
||||
directory=/root/
|
||||
priority=40
|
||||
startsecs=10
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
redirect_stderr=true
|
||||
|
||||
[include]
|
||||
files = /etc/supervisor/conf.d/*.conf
|
Loading…
Reference in New Issue