feat(docker): integrate s6-overlay

This commit is contained in:
Jacky 2024-05-05 12:24:26 +08:00
parent 02d279fa97
commit 9bd1507392
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
6 changed files with 37 additions and 17 deletions

View file

@ -0,0 +1,12 @@
#!/bin/bash
# the up and down files are special: they're not shell scripts,
# but single command lines interpreted by execlineb.
# You should not have to worry about execline;
# you should only remember that an up file contains a single command line.
if [ "$(ls -A /etc/nginx)" = "" ]; then
echo "[INFO] Initialing Nginx configurations directory"
cp -rp /usr/etc/nginx/* /etc/nginx/
echo "[INFO] Nginx configurations directory initialed"
fi

View file

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-config/init-config.sh

View file

@ -0,0 +1,2 @@
#!/bin/sh
nginx-ui --config /etc/nginx-ui/app.ini

View file

@ -1,10 +0,0 @@
#!/bin/bash
if [ "$(ls -A /etc/nginx)" = "" ]; then
echo "Initialing Nginx config dir"
cp -rp /usr/etc/nginx/* /etc/nginx/
echo "Initialed Nginx config dir"
fi
nginx &
/app/nginx-ui --config /etc/nginx-ui/app.ini