Merge pull request 'add_default_conf' (#1) from add_default_conf into master

Reviewed-on: #1
This commit is contained in:
dany 2022-08-18 11:10:26 +02:00
commit 544fcea280
4 changed files with 61 additions and 1 deletions

View File

@ -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

49
antd-config.ini Normal file
View File

@ -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>&<query>
[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

4
runner.ini Normal file
View File

@ -0,0 +1,4 @@
[vterm]
exec = /opt/www/bin/vterm
param = /opt/www/tmp/channels/antd_hotline.sock
debug = 0

View File

@ -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