From 4da4f14075e35bc21da15126bc123cb377b59fbd Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 18 Aug 2022 10:58:37 +0200 Subject: [PATCH 1/4] Add 'antd-config.ini' --- antd-config.ini | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 antd-config.ini diff --git a/antd-config.ini b/antd-config.ini new file mode 100644 index 0000000..2222edc --- /dev/null +++ b/antd-config.ini @@ -0,0 +1,49 @@ +[SERVER] +plugins=/opt/www/lib/ +plugins_ext=.so +database=/app/data/database/ +tmpdir=/app/data/tmp/ +maxcon=500 +backlog=5000 +workers = 4 +max_upload_size = 20000000 +gzip_enable = 1 +gzip_types = text\/.*,.*\/css,.*\/json,.*\/javascript + +[PORT:80] +htdocs=/opt/www/htdocs +ssl.enable=0 +^/os/(.*)$ = /os/router.lua?r=<1>& + +[AUTOSTART] +plugin = tunnel + +[MIMES] +image/bmp=bmp +image/jpeg=jpg,jpeg +text/css=css +text/markdown=md +text/csv=csv +application/pdf=pdf +image/gif=gif +text/html=html,htm,chtml +application/json=json +application/javascript=js +image/png=png +image/x-portable-pixmap=ppm +application/x-rar-compressed=rar +image/tiff=tiff +application/x-tar=tar +text/plain=txt +application/x-font-ttf=ttf +application/xhtml+xml=xhtml +application/xml=xml +application/zip=zip +image/svg+xml=svg +application/vnd.ms-fontobject=eot +application/x-font-woff=woff,woff2 +application/x-font-otf=otf +audio/mpeg=mp3,mpeg + +[FILEHANDLER] +lua = lua \ No newline at end of file From 60922f822cc22ff6f8ce692ff90213face25ba16 Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 18 Aug 2022 11:00:18 +0200 Subject: [PATCH 2/4] Add 'runner.ini' --- runner.ini | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 runner.ini diff --git a/runner.ini b/runner.ini new file mode 100644 index 0000000..f94d252 --- /dev/null +++ b/runner.ini @@ -0,0 +1,4 @@ +[vterm] +exec = /opt/www/bin/vterm +param = /opt/www/tmp/channels/antd_hotline.sock +debug = 0 \ No newline at end of file From 27c76ad28bad6d986b7023be0e1ef16b124d17a9 Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 18 Aug 2022 11:05:06 +0200 Subject: [PATCH 3/4] Update 'Dockerfile' --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index c8f8505..4241f93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,10 @@ COPY --from=deploy-env /bin/wget /bin/ COPY --from=deploy-env /platform/ / RUN rm /etc/systemd -rf # copy frontend +COPY antd-config.ini /opt/www/antd-config.ini +COPY runner.ini /opt/www/runner.ini +RUN chmod 744 /opt/www/antd-config.ini +RUN chmod 744 /opt/www/runner.ini COPY antos/frontend/ / RUN chown -R root:root /opt/www/htdocs/ RUN rm -rf /etc/systemd From 3dbdbd78e013a664420cd70adb7f0a915c056c6d Mon Sep 17 00:00:00 2001 From: dany Date: Thu, 18 Aug 2022 11:08:24 +0200 Subject: [PATCH 4/4] Update 'start.sh' --- start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/start.sh b/start.sh index d9e1616..0ce7703 100755 --- a/start.sh +++ b/start.sh @@ -11,7 +11,10 @@ ln -sf /app/data/tmp /opt/www/tmp adduser --home "/home/$ANTOS_USER" --disabled-password --gecos "" "$ANTOS_USER" echo "$ANTOS_USER:$ANTOS_PASSWORD" | /bin/chpasswd # start antd-tunnel service +[ ! -f "/app/antd-config.ini" ] && cp /opt/www/antd-config.ini /app/antd-config.ini +[ ! -f "/app/runner.ini" ] && cp /opt/www/runner.ini /app/runner.ini + /usr/bin/antd /app/antd-config.ini & -sleep 1 +sleep 2 [ -f /app/runner.ini ] && /opt/www/bin/runner /app/runner.ini & wait \ No newline at end of file