diff --git a/Dockerfile b/Dockerfile index d24f54a..3b9b247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,55 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:3.13 as migration-bins +FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as migration-bins RUN \ - echo "**** install buid packages ****" && \ - apk add --no-cache \ - curl \ - git \ - go && \ - echo "**** build fs-repo-migrations ****" && \ - mkdir /bins && \ - IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]') && \ - git clone https://github.com/ipfs/fs-repo-migrations.git && \ - cd fs-repo-migrations && \ - git checkout ${IPFSMIG_VERSION} && \ - for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ - cd ${BUILD} && \ - go build && \ - mv fs-repo-* /bins/ && \ - cd .. ; \ - done + echo "**** install buid packages ****" && \ + apk add --no-cache \ + curl \ + git \ + go && \ + echo "**** build fs-repo-migrations ****" && \ + mkdir /bins && \ + IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]') && \ + git clone https://github.com/ipfs/fs-repo-migrations.git && \ + cd fs-repo-migrations && \ + git checkout ${IPFSMIG_VERSION} && \ + for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ + cd ${BUILD} && \ + go build && \ + mv fs-repo-* /bins/ && \ + cd .. ; \ + done + +FROM ghcr.io/linuxserver/baseimage-alpine:3.14 as ipfswebui + +ARG IPFSWEB_VERSION + +RUN \ + echo "**** install build packages ****" && \ + apk add --no-cache \ + alpine-sdk \ + git \ + nodejs \ + npm \ + python3-dev && \ + echo "**** build frontend ****" && \ + if [ -z ${IPFSWEB_VERSION+x} ]; then \ + IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + git clone https://github.com/ipfs/ipfs-webui.git && \ + cd ipfs-webui/ && \ + git checkout ${IPFSWEB_VERSION} && \ + npm install --production && \ + npm install typescript && \ + NODE_ENV=production \ + node node_modules/react-scripts/bin/react-scripts.js build -FROM ghcr.io/linuxserver/baseimage-alpine:3.13 +FROM ghcr.io/linuxserver/baseimage-alpine:3.14 # set version label ARG BUILD_DATE ARG VERSION -ARG IPFSWEB_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thelamer" @@ -33,43 +57,27 @@ LABEL maintainer="thelamer" ENV IPFS_PATH=/config/ipfs RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - curl \ - logrotate \ - nginx \ - openssl \ - php7 \ - php7-fpm && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - go-ipfs && \ - echo "**** install ipfs web-ui ****" && \ - mkdir -p /var/www/html/ && \ - if [ -z ${IPFSWEB_VERSION+x} ]; then \ - IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -o \ - /tmp/ipfswebui.tar.gz -L \ - "https://github.com/ipfs/ipfs-webui/releases/download/${IPFSWEB_VERSION}/ipfs-webui.tar.gz" && \ - tar xf \ - /tmp/ipfswebui.tar.gz -C \ - /var/www/html/ --strip-components=1 && \ - echo "**** configure nginx ****" && \ - echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> \ - /etc/nginx/fastcgi_params && \ - rm -f /etc/nginx/conf.d/default.conf && \ - echo "**** fix logrotate ****" && \ - sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ - sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ - /etc/periodic/daily/logrotate && \ - echo "**** cleanup ****" && \ - rm -rf \ - /tmp/* + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + curl \ + logrotate \ + nginx \ + openssl && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ + go-ipfs && \ + mkdir -p /var/www/html && \ + echo "**** fix logrotate ****" && \ + sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ + sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ + /etc/periodic/daily/logrotate && \ + echo "**** cleanup ****" && \ + rm -rf \ + /tmp/* # copy files COPY root/ / COPY --from=migration-bins /bins /usr/bin +COPY --from=ipfswebui /ipfs-webui/build/ /var/www/html/ # ports and volumes EXPOSE 80 443 4001 5001 8080 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 1752dbe..5750984 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,33 +1,56 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.13 as migration-bins +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14 as migration-bins RUN \ - echo "**** install buid packages ****" && \ - apk add --no-cache \ - curl \ - gcc \ - git \ - go \ - musl-dev && \ - echo "**** build fs-repo-migrations ****" && \ - mkdir /bins && \ - IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]') && \ - git clone https://github.com/ipfs/fs-repo-migrations.git && \ - cd fs-repo-migrations && \ - git checkout ${IPFSMIG_VERSION} && \ - for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ - cd ${BUILD} && \ - go build && \ - mv fs-repo-* /bins/ && \ - cd .. ; \ - done + echo "**** install buid packages ****" && \ + apk add --no-cache \ + alpine-sdk \ + curl \ + git \ + go && \ + echo "**** build fs-repo-migrations ****" && \ + mkdir /bins && \ + IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]') && \ + git clone https://github.com/ipfs/fs-repo-migrations.git && \ + cd fs-repo-migrations && \ + git checkout ${IPFSMIG_VERSION} && \ + for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ + cd ${BUILD} && \ + go build && \ + mv fs-repo-* /bins/ && \ + cd .. ; \ + done + +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14 as ipfswebui + +ARG IPFSWEB_VERSION + +RUN \ + echo "**** install build packages ****" && \ + apk add --no-cache \ + alpine-sdk \ + git \ + nodejs \ + npm \ + python3-dev && \ + echo "**** build frontend ****" && \ + if [ -z ${IPFSWEB_VERSION+x} ]; then \ + IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + git clone https://github.com/ipfs/ipfs-webui.git && \ + cd ipfs-webui/ && \ + git checkout ${IPFSWEB_VERSION} && \ + npm install --production && \ + npm install typescript && \ + NODE_ENV=production \ + node node_modules/react-scripts/bin/react-scripts.js build -FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.13 +FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14 # set version label ARG BUILD_DATE ARG VERSION -ARG IPFSWEB_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thelamer" @@ -35,43 +58,27 @@ LABEL maintainer="thelamer" ENV IPFS_PATH=/config/ipfs RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - curl \ - logrotate \ - nginx \ - openssl \ - php7 \ - php7-fpm && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - go-ipfs && \ - echo "**** install ipfs web-ui ****" && \ - mkdir -p /var/www/html/ && \ - if [ -z ${IPFSWEB_VERSION+x} ]; then \ - IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -o \ - /tmp/ipfswebui.tar.gz -L \ - "https://github.com/ipfs/ipfs-webui/releases/download/${IPFSWEB_VERSION}/ipfs-webui.tar.gz" && \ - tar xf \ - /tmp/ipfswebui.tar.gz -C \ - /var/www/html/ --strip-components=1 && \ - echo "**** configure nginx ****" && \ - echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> \ - /etc/nginx/fastcgi_params && \ - rm -f /etc/nginx/conf.d/default.conf && \ - echo "**** fix logrotate ****" && \ - sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ - sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ - /etc/periodic/daily/logrotate && \ - echo "**** cleanup ****" && \ - rm -rf \ - /tmp/* + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + curl \ + logrotate \ + nginx \ + openssl && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ + go-ipfs && \ + mkdir -p /var/www/html && \ + echo "**** fix logrotate ****" && \ + sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ + sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ + /etc/periodic/daily/logrotate && \ + echo "**** cleanup ****" && \ + rm -rf \ + /tmp/* # copy files COPY root/ / COPY --from=migration-bins /bins /usr/bin +COPY --from=ipfswebui /ipfs-webui/build/ /var/www/html/ # ports and volumes EXPOSE 80 443 4001 5001 8080 diff --git a/Dockerfile.armhf b/Dockerfile.armhf index d9e2341..268f2ff 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,33 +1,56 @@ -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.13 as migration-bins +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14 as migration-bins RUN \ - echo "**** install buid packages ****" && \ - apk add --no-cache \ - curl \ - gcc \ - git \ - go \ - musl-dev && \ - echo "**** build fs-repo-migrations ****" && \ - mkdir /bins && \ - IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]') && \ - git clone https://github.com/ipfs/fs-repo-migrations.git && \ - cd fs-repo-migrations && \ - git checkout ${IPFSMIG_VERSION} && \ - for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ - cd ${BUILD} && \ - go build && \ - mv fs-repo-* /bins/ && \ - cd .. ; \ - done + echo "**** install buid packages ****" && \ + apk add --no-cache \ + alpine-sdk \ + curl \ + git \ + go && \ + echo "**** build fs-repo-migrations ****" && \ + mkdir /bins && \ + IPFSMIG_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/fs-repo-migrations/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]') && \ + git clone https://github.com/ipfs/fs-repo-migrations.git && \ + cd fs-repo-migrations && \ + git checkout ${IPFSMIG_VERSION} && \ + for BUILD in fs-repo-migrations fs-repo-9-to-10 fs-repo-10-to-11; do \ + cd ${BUILD} && \ + go build && \ + mv fs-repo-* /bins/ && \ + cd .. ; \ + done + +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14 as ipfswebui + +ARG IPFSWEB_VERSION + +RUN \ + echo "**** install build packages ****" && \ + apk add --no-cache \ + alpine-sdk \ + git \ + nodejs \ + npm \ + python3-dev && \ + echo "**** build frontend ****" && \ + if [ -z ${IPFSWEB_VERSION+x} ]; then \ + IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ + | awk '/tag_name/{print $4;exit}' FS='[""]'); \ + fi && \ + git clone https://github.com/ipfs/ipfs-webui.git && \ + cd ipfs-webui/ && \ + git checkout ${IPFSWEB_VERSION} && \ + npm install --production && \ + npm install typescript && \ + NODE_ENV=production \ + node node_modules/react-scripts/bin/react-scripts.js build -FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.13 +FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14 # set version label ARG BUILD_DATE ARG VERSION -ARG IPFSWEB_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thelamer" @@ -35,43 +58,27 @@ LABEL maintainer="thelamer" ENV IPFS_PATH=/config/ipfs RUN \ - echo "**** install runtime packages ****" && \ - apk add --no-cache \ - curl \ - logrotate \ - nginx \ - openssl \ - php7 \ - php7-fpm && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - go-ipfs && \ - echo "**** install ipfs web-ui ****" && \ - mkdir -p /var/www/html/ && \ - if [ -z ${IPFSWEB_VERSION+x} ]; then \ - IPFSWEB_VERSION=$(curl -sX GET "https://api.github.com/repos/ipfs/ipfs-webui/releases/latest" \ - | awk '/tag_name/{print $4;exit}' FS='[""]'); \ - fi && \ - curl -o \ - /tmp/ipfswebui.tar.gz -L \ - "https://github.com/ipfs/ipfs-webui/releases/download/${IPFSWEB_VERSION}/ipfs-webui.tar.gz" && \ - tar xf \ - /tmp/ipfswebui.tar.gz -C \ - /var/www/html/ --strip-components=1 && \ - echo "**** configure nginx ****" && \ - echo 'fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;' >> \ - /etc/nginx/fastcgi_params && \ - rm -f /etc/nginx/conf.d/default.conf && \ - echo "**** fix logrotate ****" && \ - sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ - sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ - /etc/periodic/daily/logrotate && \ - echo "**** cleanup ****" && \ - rm -rf \ - /tmp/* + echo "**** install runtime packages ****" && \ + apk add --no-cache \ + curl \ + logrotate \ + nginx \ + openssl && \ + apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ + go-ipfs && \ + mkdir -p /var/www/html && \ + echo "**** fix logrotate ****" && \ + sed -i "s#/var/log/messages {}.*# #g" /etc/logrotate.conf && \ + sed -i 's#/usr/sbin/logrotate /etc/logrotate.conf#/usr/sbin/logrotate /etc/logrotate.conf -s /config/log/logrotate.status#g' \ + /etc/periodic/daily/logrotate && \ + echo "**** cleanup ****" && \ + rm -rf \ + /tmp/* # copy files COPY root/ / COPY --from=migration-bins /bins /usr/bin +COPY --from=ipfswebui /ipfs-webui/build/ /var/www/html/ # ports and volumes EXPOSE 80 443 4001 5001 8080 diff --git a/README.md b/README.md index 0bd4a37..c687e83 100644 --- a/README.md +++ b/README.md @@ -240,6 +240,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **19.09.21:** - Build webui from source. Update code formatting. Rebase to Alpine 3.14. * **01.04.21:** - Add migration bins to image to support upgrades. * **24.02.20:** - Rebase to Alpine 3.13. * **09.07.19:** - Initial version. diff --git a/readme-vars.yml b/readme-vars.yml index b2206c2..73e3d53 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -50,6 +50,7 @@ app_setup_block: | # changelog changelogs: + - { date: "19.09.21:", desc: "Build webui from source. Update code formatting. Rebase to Alpine 3.14." } - { date: "01.04.21:", desc: "Add migration bins to image to support upgrades." } - { date: "24.02.20:", desc: "Rebase to Alpine 3.13." } - { date: "09.07.19:", desc: "Initial version." } diff --git a/root/defaults/default b/root/defaults/default index 80c1fcc..3b6ff28 100644 --- a/root/defaults/default +++ b/root/defaults/default @@ -1,22 +1,15 @@ server { listen 80 default_server; listen 443 ssl; - server_name APP_URL_PLACEHOLDER; root /var/www/html; - index index.html index.htm index.php; + index index.html; ssl_certificate /config/keys/cert.crt; ssl_certificate_key /config/keys/cert.key; client_max_body_size 0; -location / { - try_files $uri $uri/ /index.html /index.php?$args =404; -} -location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass 127.0.0.1:9000; - fastcgi_index index.php; - include /etc/nginx/fastcgi_params; + location / { + try_files $uri $uri/ =404; } -location /.env { - return 404; + location /.env { + return 404; } } diff --git a/root/etc/cont-init.d/20-config b/root/etc/cont-init.d/20-config index 386b536..f7910e5 100644 --- a/root/etc/cont-init.d/20-config +++ b/root/etc/cont-init.d/20-config @@ -2,47 +2,31 @@ # ipfs config if [ ! -d "/config/ipfs" ]; then - ipfs init - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]' - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' - ipfs config --json Addresses.API '"/ip4/0.0.0.0/tcp/5001"' - ipfs config --json Addresses.Gateway '"/ip4/0.0.0.0/tcp/8080"' + ipfs init + ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]' + ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]' + ipfs config --json Addresses.API '"/ip4/0.0.0.0/tcp/5001"' + ipfs config --json Addresses.Gateway '"/ip4/0.0.0.0/tcp/8080"' fi # make our folders mkdir -p \ - /config/{nginx/site-confs,log/nginx,keys,log/php,php} \ - /run \ - /var/lib/nginx/tmp/client_body \ - /var/tmp/nginx + /config/{nginx/site-confs,log/nginx,keys} \ + /run \ + /var/lib/nginx/tmp/client_body \ + /var/tmp/nginx # copy config files [[ ! -f /config/nginx/nginx.conf ]] && \ - cp /defaults/nginx.conf /config/nginx/nginx.conf + cp /defaults/nginx.conf /config/nginx/nginx.conf [[ ! -f /config/nginx/site-confs/default ]] && \ - cp /defaults/default /config/nginx/site-confs/default - -# create local php.ini if it doesn't exist, set local timezone -[[ ! -f /config/php/php-local.ini ]] && \ - printf "; Edit this file to override php.ini directives and restart the container\\n\\ndate.timezone = %s\\n" "$TZ" > /config/php/php-local.ini -# copy user php-local.ini to image -cp /config/php/php-local.ini /etc/php7/conf.d/php-local.ini -#fix php-fpm log location -sed -i "s#;error_log = log/php7/error.log.*#error_log = /config/log/php/error.log#g" /etc/php7/php-fpm.conf -#fix php-fpm user -sed -i "s#user = nobody.*#user = abc#g" /etc/php7/php-fpm.d/www.conf -sed -i "s#group = nobody.*#group = abc#g" /etc/php7/php-fpm.d/www.conf -# create override for www.conf if it doesn't exist -[[ ! -f /config/php/www2.conf ]] && \ - printf "; Edit this file to override www.conf and php-fpm.conf directives and restart the container\\n\\n; Pool name\\n[www]\\n\\n" > /config/php/www2.conf -# copy user www2.conf to image -cp /config/php/www2.conf /etc/php7/php-fpm.d/www2.conf + cp /defaults/default /config/nginx/site-confs/default # permissions chown -R abc:abc \ - /config \ - /var/lib/nginx \ - /var/tmp/nginx + /config \ + /var/lib/nginx \ + /var/tmp/nginx chmod -R g+w \ - /config/nginx + /config/nginx chmod -R 644 /etc/logrotate.d diff --git a/root/etc/cont-init.d/30-keygen b/root/etc/cont-init.d/30-keygen index 65125ca..ceef02d 100644 --- a/root/etc/cont-init.d/30-keygen +++ b/root/etc/cont-init.d/30-keygen @@ -1,10 +1,8 @@ #!/usr/bin/with-contenv bash SUBJECT="/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*" if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then -echo "using keys found in /config/keys" + echo "using keys found in /config/keys" else -echo "generating self-signed keys in /config/keys, you can replace these with your own keys if required" -openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT" + echo "generating self-signed keys in /config/keys, you can replace these with your own keys if required" + openssl req -new -x509 -days 3650 -nodes -out /config/keys/cert.crt -keyout /config/keys/cert.key -subj "$SUBJECT" fi - - diff --git a/root/etc/cont-init.d/40-migrate b/root/etc/cont-init.d/40-migrate index a6f2f9c..bee3bb5 100644 --- a/root/etc/cont-init.d/40-migrate +++ b/root/etc/cont-init.d/40-migrate @@ -2,6 +2,6 @@ # ipfs migrate check on startup if [ -d "/config/ipfs" ]; then - echo "[ipfs-upgrade] Checking if fs-repo needs to be upgraded (this may take some time)" - s6-setuidgid abc /usr/bin/fs-repo-migrations -y + echo "[ipfs-upgrade] Checking if fs-repo needs to be upgraded (this may take some time)" + s6-setuidgid abc /usr/bin/fs-repo-migrations -y fi diff --git a/root/etc/logrotate.d/php-fpm7 b/root/etc/logrotate.d/php-fpm7 deleted file mode 100644 index 865547f..0000000 --- a/root/etc/logrotate.d/php-fpm7 +++ /dev/null @@ -1,14 +0,0 @@ -/config/log/php/*.log { - rotate 7 - weekly - missingok - notifempty - delaycompress - compress - nodateext - sharedscripts - postrotate - s6-svc -t /var/run/s6/services/php-fpm - endscript - su abc abc -} diff --git a/root/etc/services.d/ipfs/run b/root/etc/services.d/ipfs/run index 221b1c7..f98d906 100644 --- a/root/etc/services.d/ipfs/run +++ b/root/etc/services.d/ipfs/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv bash exec \ - s6-setuidgid abc ipfs daemon + s6-setuidgid abc ipfs daemon diff --git a/root/etc/services.d/nginx/run b/root/etc/services.d/nginx/run index 26049ab..c58eac2 100644 --- a/root/etc/services.d/nginx/run +++ b/root/etc/services.d/nginx/run @@ -1,7 +1,7 @@ #!/usr/bin/with-contenv bash if pgrep -f "[n]ginx:" > /dev/null; then - pkill -ef [n]ginx: + pkill -ef [n]ginx: fi exec /usr/sbin/nginx -c /config/nginx/nginx.conf diff --git a/root/etc/services.d/php-fpm/run b/root/etc/services.d/php-fpm/run deleted file mode 100644 index 158771e..0000000 --- a/root/etc/services.d/php-fpm/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv bash - -exec /usr/sbin/php-fpm7 -F