Merge pull request #17 from linuxserver/format

Format shell scripts
This commit is contained in:
Eric Nemchik 2023-01-18 06:04:32 -06:00 committed by GitHub
commit d7210d7aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 13 deletions

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
# set version label
@ -13,9 +15,7 @@ ENV BUDGE_DATABASE=/config/budge.db \
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
g++ \
gcc \
make \
build-base \
musl-dev \
python3 && \
echo "**** install runtime packages ****" && \
@ -61,3 +61,7 @@ RUN \
# add local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17
# set version label
@ -13,9 +15,7 @@ ENV BUDGE_DATABASE=/config/budge.db \
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
g++ \
gcc \
make \
build-base \
musl-dev \
python3 && \
echo "**** install runtime packages ****" && \
@ -31,7 +31,7 @@ RUN \
fi && \
curl -o \
/tmp/budge.tar.gz -L \
"https://github.com/linuxserver/BudgE/archive/${BUDGE_RELEASE}.tar.gz" && \
"https://github.com/linuxserver/budge/archive/${BUDGE_RELEASE}.tar.gz" && \
tar xf \
/tmp/budge.tar.gz -C \
/app/www/public/ --strip-components=1 && \
@ -61,3 +61,7 @@ RUN \
# add local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config

View File

@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17
# set version label
@ -13,9 +15,7 @@ ENV BUDGE_DATABASE=/config/budge.db \
RUN \
echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies \
g++ \
gcc \
make \
build-base \
musl-dev \
python3 && \
echo "**** install runtime packages ****" && \
@ -31,7 +31,7 @@ RUN \
fi && \
curl -o \
/tmp/budge.tar.gz -L \
"https://github.com/linuxserver/BudgE/archive/${BUDGE_RELEASE}.tar.gz" && \
"https://github.com/linuxserver/budge/archive/${BUDGE_RELEASE}.tar.gz" && \
tar xf \
/tmp/budge.tar.gz -C \
/app/www/public/ --strip-components=1 && \
@ -61,3 +61,7 @@ RUN \
# add local files
COPY root/ /
# ports and volumes
EXPOSE 80 443
VOLUME /config

View File

@ -1,7 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
shopt -s globstar
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 5000" \
cd /app/www/public/backend/build s6-setuidgid abc /usr/bin/npm run start --logs-dir /config/log/npm
cd /app/www/public/backend/build s6-setuidgid abc /usr/bin/npm run start --logs-dir /config/log/npm

View File

@ -1,4 +1,5 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
rm -rf /etc/s6-overlay/s6-rc.d/svc-php-fpm
rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/svc-php-fpm

View File

@ -1,10 +1,11 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
DEFAULT_CONF="/config/nginx/site-confs/default.conf"
OLD_ROOT="root /app/budge/frontend/build;"
NEW_ROOT="root /app/www/public/frontend/build;"
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null;then
if grep -q "${OLD_ROOT}" "${DEFAULT_CONF}" 2>/dev/null; then
echo "updating root in ${DEFAULT_CONF}"
sed -i "s|${OLD_ROOT}|${NEW_ROOT}|" "${DEFAULT_CONF}"
fi