diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..0f96fd1 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,22 @@ +--- + +version: 2 + +updates: + # Maintain dependencies for Docker + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: daily + time: "00:00" + timezone: "Etc/UTC" + assignees: + - "mikenye" + + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + assignees: + - "mikenye" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d65a53a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,83 @@ +--- +name: Deploy + +on: + workflow_dispatch: + inputs: + reason: + required: true + description: "Reason for running this workflow" + use_test_image: + required: false + type: boolean + description: "Use base image testpr" + default: false + push: + branches: + - main + # Don't trigger if it's just a documentation update + paths-ignore: + - "**.md" + - "**.MD" + - "**.yml" + - "LICENSE" + - ".gitattributes" + - ".gitignore" + - ".dockerignore" + +# Set workflow-wide environment variables +# - REPO: repo name on dockerhub +# - IMAGE: image name on dockerhub +env: + GHCR_IMAGE: ${{ github.repository }} + GHCR_REGISTRY: ghcr.io + +jobs: + workflow-dispatch: + name: Triggered via Workflow Dispatch? + # only run this step if workflow dispatch triggered + # log the reason the workflow dispatch was triggered + if: | + github.event_name == 'workflow_dispatch' && + github.event.inputs.reason != '' + runs-on: ubuntu-latest + steps: + - name: Log dispatch reason + env: + INPUTS_REASON: ${{ github.event.inputs.reason }} + INPUTS_USE_TEST_IMAGE: ${{ github.event.inputs.use_test_image }} + run: | + echo "Workflow dispatch reason: $INPUTS_REASON" + echo "Use test image: $INPUTS_USE_TEST_IMAGE" + + hadolint: + name: Run hadolint against docker files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Pull hadolint/hadolint:latest Image + run: docker pull hadolint/hadolint:latest + - name: Run hadolint against Dockerfiles + run: docker run --rm -i -v "$PWD":/workdir --workdir /workdir --entrypoint hadolint hadolint/hadolint --ignore DL3003 --ignore DL3006 --ignore DL3010 --ignore DL4001 --ignore DL3007 --ignore DL3008 --ignore SC2068 --ignore DL3007 --ignore SC1091 --ignore DL3013 --ignore DL3010 $(find . -type f -iname "Dockerfile*") + + build_and_push: + name: Image Build & Push + uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main + needs: [hadolint] + with: + push_enabled: true + push_destinations: ghcr.io + ghcr_repo_owner: ${{ github.repository_owner }} + ghcr_repo: ${{ github.repository }} + platform_linux_arm32v6_enabled: false + platform_linux_i386_enabled: false + # set build_latest to true if github.event.inputs.use_test_image is false + build_latest: ${{ github.event.inputs.use_test_image == 'false' || github.event.inputs.use_test_image == '' }} + build_baseimage_test: ${{ github.event.inputs.use_test_image == 'true' }} + # only build the entire stack if we are not using the test image + build_version_specific: false + build_platform_specific: false + build_nohealthcheck: false + build_baseimage_url: :base/:base-test-pr + secrets: + ghcr_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index b46eef9..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Docker - -on: - push: - pull_request: - branches: [ master ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Build the Docker image - run: docker build --no-cache . --file Dockerfile --tag mikenye/flightairmap:testing diff --git a/Dockerfile b/Dockerfile index 394bdf6..2cc013d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:stable-slim +FROM ghcr.io/sdr-enthusiasts/docker-baseimage:base ENV BASESTATIONPORT="30003" \ FAM_BINGKEY="" \ @@ -47,18 +47,18 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN set -x && \ apt-get update -y && \ apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - file \ - git \ - html2text \ - jq \ - locales \ - procps \ - socat \ - wget \ - pwgen \ - && \ + ca-certificates \ + curl \ + file \ + git \ + html2text \ + jq \ + locales \ + procps \ + socat \ + wget \ + pwgen \ + && \ useradd -d "/home/${WEBUSER}" -m -r -U "${WEBUSER}" && \ echo "========== Setup locales ==========" && \ echo "en_US ISO-8859-1" >> /etc/locale.gen && \ @@ -66,30 +66,34 @@ RUN set -x && \ echo "es_ES ISO-8859-1" >> /etc/locale.gen && \ echo "fr_FR ISO-8859-1" >> /etc/locale.gen && \ locale-gen && \ - echo "========== Deploy php7 ==========" && \ + echo "========== Deploy php ==========" && \ + apt-get install software-properties-common ca-certificates lsb-release apt-transport-https -y --no-install-recommends && \ + sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' && \ + wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - && \ + apt-get update -y && \ apt-get install -y --no-install-recommends \ - php \ - php-curl \ - php-fpm \ - php-gd \ - php-gettext \ - php-json \ - php-mysql \ - php-xml \ - php-zip \ - && \ - sed -i '/;error_log/c\error_log = /proc/self/fd/2' /etc/php/7.3/fpm/php-fpm.conf && \ + php7.4 \ + php7.4-curl \ + php7.4-fpm \ + php7.4-gd \ + php7.4-gettext \ + php7.4-json \ + php7.4-mysql \ + php7.4-xml \ + php7.4-zip \ + && \ + sed -i '/;error_log/c\error_log = /proc/self/fd/2' /etc/php/7.4/fpm/php-fpm.conf && \ mkdir -p /run/php && \ - rm -vrf /etc/php/7.3/fpm/pool.d/* && \ + #rm -vrf /etc/php/8.2/fpm/pool.d/* && \ echo "========== Deploy nginx ==========" && \ apt-get install -y --no-install-recommends \ - nginx-light && \ + nginx-light && \ rm -vf /etc/nginx/conf.d/default.conf && \ rm -vrf /var/www/* && \ usermod -aG www-data "${WEBUSER}" && \ echo "========== Deploy MariaDB ==========" && \ apt-get install -y --no-install-recommends \ - mariadb-server && \ + mariadb-server && \ mkdir -p /run/mysqld && \ chown -vR mysql:mysql /run/mysqld && \ echo "========== Deploy FlightAirMap ==========" && \ @@ -99,21 +103,15 @@ RUN set -x && \ chown -vR "${WEBUSER}":"${WEBUSER}" /var/www/flightairmap && \ git log | head -1 | tr -s " " "_" | tee /VERSION || true && \ rm -rf /var/www/flightairmap/htdocs/.git && \ - echo "========== Deploy s6-overlay ==========" && \ - apt-get install --no-install-recommends -y gnupg && \ - wget -q -O - https://raw.githubusercontent.com/mikenye/deploy-s6-overlay/master/deploy-s6-overlay.sh | sh && \ - apt-get remove -y gnupg && \ echo "========== Clean up ==========" && \ apt-get remove -y \ - file \ - git \ - && \ + file \ + git \ + && \ apt-get autoremove -y && \ rm -rf /var/lib/apt/lists/* /tmp/* /src # Copy config files -COPY etc/ /etc/ - -ENTRYPOINT [ "/init" ] +COPY rootfs/ / EXPOSE 80 diff --git a/etc/services.d/php-fpm/run b/etc/services.d/php-fpm/run deleted file mode 100644 index b0a1e5d..0000000 --- a/etc/services.d/php-fpm/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/with-contenv sh -# shellcheck shell=sh - -/usr/sbin/php-fpm7.3 --nodaemonize 2>&1 | awk '{print "[php-fpm] " $0}' - diff --git a/etc/nginx/conf.d/flightairmap.conf b/rootfs/etc/nginx/conf.d/flightairmap.conf similarity index 100% rename from etc/nginx/conf.d/flightairmap.conf rename to rootfs/etc/nginx/conf.d/flightairmap.conf diff --git a/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf similarity index 100% rename from etc/nginx/nginx.conf rename to rootfs/etc/nginx/nginx.conf diff --git a/etc/php/7.3/fpm/pool.d/flightairmap.conf b/rootfs/etc/php/7.4/fpm/pool.d/flightairmap.conf similarity index 100% rename from etc/php/7.3/fpm/pool.d/flightairmap.conf rename to rootfs/etc/php/7.4/fpm/pool.d/flightairmap.conf diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/type b/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/type @@ -0,0 +1 @@ +oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/up b/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/up new file mode 100755 index 0000000..08ac656 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/01-sanitycheck/up @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/01-sanitycheck diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/type b/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/type @@ -0,0 +1 @@ +oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/up b/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/up new file mode 100755 index 0000000..635930c --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/02-firstrun/up @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/02-firstrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/03-settings/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/03-settings/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/03-settings/type b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/type new file mode 100644 index 0000000..bdd22a1 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/type @@ -0,0 +1 @@ +oneshot diff --git a/rootfs/etc/s6-overlay/s6-rc.d/03-settings/up b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/up new file mode 100755 index 0000000..b81db8a --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/03-settings/up @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/03-settings diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/run b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/run new file mode 100755 index 0000000..6a8a4ed --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/daemon-acars diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/type b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/daemon-acars/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/run b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/run new file mode 100755 index 0000000..0863de5 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/daemon-spotter diff --git a/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/type b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/daemon-spotter/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/mysql/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mysql/run b/rootfs/etc/s6-overlay/s6-rc.d/mysql/run new file mode 100755 index 0000000..c770389 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/mysql/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/mysql diff --git a/rootfs/etc/s6-overlay/s6-rc.d/mysql/type b/rootfs/etc/s6-overlay/s6-rc.d/mysql/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/mysql/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/nginx/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/run b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run new file mode 100755 index 0000000..119fefd --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/nginx/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/nginx diff --git a/rootfs/etc/s6-overlay/s6-rc.d/nginx/type b/rootfs/etc/s6-overlay/s6-rc.d/nginx/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/nginx/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/run b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/run new file mode 100755 index 0000000..69da302 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/php-fpm diff --git a/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/type b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/php-fpm/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/socat/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/socat/run b/rootfs/etc/s6-overlay/s6-rc.d/socat/run new file mode 100755 index 0000000..a5077f4 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/socat/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/socat diff --git a/rootfs/etc/s6-overlay/s6-rc.d/socat/type b/rootfs/etc/s6-overlay/s6-rc.d/socat/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/socat/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/update_db/dependencies.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/update_db/run b/rootfs/etc/s6-overlay/s6-rc.d/update_db/run new file mode 100755 index 0000000..9a88450 --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/update_db/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /etc/s6-overlay/scripts/update_db diff --git a/rootfs/etc/s6-overlay/s6-rc.d/update_db/type b/rootfs/etc/s6-overlay/s6-rc.d/update_db/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rootfs/etc/s6-overlay/s6-rc.d/update_db/type @@ -0,0 +1 @@ +longrun diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-sanitycheck b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/01-sanitycheck new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/02-firstrun b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/02-firstrun new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/03-settings b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/03-settings new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/daemon-acars b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/daemon-acars new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/daemon-spotter b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/daemon-spotter new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/mysql b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/mysql new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/nginx new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/php-fpm b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/php-fpm new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/socat b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/socat new file mode 100644 index 0000000..e69de29 diff --git a/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/update_db b/rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/update_db new file mode 100644 index 0000000..e69de29 diff --git a/etc/cont-init.d/01-sanitycheck b/rootfs/etc/s6-overlay/scripts/01-sanitycheck old mode 100644 new mode 100755 similarity index 96% rename from etc/cont-init.d/01-sanitycheck rename to rootfs/etc/s6-overlay/scripts/01-sanitycheck index ecbcd4b..3961bc4 --- a/etc/cont-init.d/01-sanitycheck +++ b/rootfs/etc/s6-overlay/scripts/01-sanitycheck @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv /bin/bash +#!/command/with-contenv /bin/bash #shellcheck shell=bash NOCOLOR='\033[0m' diff --git a/etc/cont-init.d/02-firstrun b/rootfs/etc/s6-overlay/scripts/02-firstrun old mode 100644 new mode 100755 similarity index 99% rename from etc/cont-init.d/02-firstrun rename to rootfs/etc/s6-overlay/scripts/02-firstrun index 0df2168..da18005 --- a/etc/cont-init.d/02-firstrun +++ b/rootfs/etc/s6-overlay/scripts/02-firstrun @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv /bin/bash +#!/command/with-contenv /bin/bash #shellcheck shell=bash if [ -n "${VERBOSE_LOGGING}" ]; then @@ -104,7 +104,7 @@ sed -i 's/access_log\ \/dev\/stdout\;/#&/' /etc/nginx/nginx.conf sed -i 's/error_log\ \/dev\/stdout/#&/' /etc/nginx/nginx.conf # Start temporary services -/usr/sbin/php-fpm7.3 --daemonize +/usr/sbin/php-fpm7.4 --daemonize /usr/sbin/nginx -g "daemon on; error_log /dev/null crit;" # re-enable nginx access log diff --git a/etc/cont-init.d/03-settings b/rootfs/etc/s6-overlay/scripts/03-settings old mode 100644 new mode 100755 similarity index 99% rename from etc/cont-init.d/03-settings rename to rootfs/etc/s6-overlay/scripts/03-settings index 2597c36..10aa2cc --- a/etc/cont-init.d/03-settings +++ b/rootfs/etc/s6-overlay/scripts/03-settings @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv /bin/bash +#!/command/with-contenv /bin/bash #shellcheck shell=bash NOCOLOR='\033[0m' diff --git a/etc/services.d/daemon-acars/run b/rootfs/etc/s6-overlay/scripts/daemon-acars old mode 100644 new mode 100755 similarity index 84% rename from etc/services.d/daemon-acars/run rename to rootfs/etc/s6-overlay/scripts/daemon-acars index 79528f8..cd406f6 --- a/etc/services.d/daemon-acars/run +++ b/rootfs/etc/s6-overlay/scripts/daemon-acars @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-acars.php 2>&1 | awk '{print "[daemon-acars] " $0}' diff --git a/etc/services.d/daemon-spotter/run b/rootfs/etc/s6-overlay/scripts/daemon-spotter old mode 100644 new mode 100755 similarity index 84% rename from etc/services.d/daemon-spotter/run rename to rootfs/etc/s6-overlay/scripts/daemon-spotter index 5a94531..bcfc955 --- a/etc/services.d/daemon-spotter/run +++ b/rootfs/etc/s6-overlay/scripts/daemon-spotter @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh s6-setuidgid "$WEBUSER" php /var/www/flightairmap/htdocs/scripts/daemon-spotter.php 2>&1 | awk '{print "[daemon-spotter] " $0}' diff --git a/etc/services.d/mysql/run b/rootfs/etc/s6-overlay/scripts/mysql old mode 100644 new mode 100755 similarity index 87% rename from etc/services.d/mysql/run rename to rootfs/etc/s6-overlay/scripts/mysql index 5b05022..68304a1 --- a/etc/services.d/mysql/run +++ b/rootfs/etc/s6-overlay/scripts/mysql @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh # if using local database diff --git a/etc/services.d/nginx/run b/rootfs/etc/s6-overlay/scripts/nginx old mode 100644 new mode 100755 similarity index 73% rename from etc/services.d/nginx/run rename to rootfs/etc/s6-overlay/scripts/nginx index 7f686a9..768a18a --- a/etc/services.d/nginx/run +++ b/rootfs/etc/s6-overlay/scripts/nginx @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh /usr/sbin/nginx 2>&1 | awk '{print "[nginx] " $0}' diff --git a/rootfs/etc/s6-overlay/scripts/php-fpm b/rootfs/etc/s6-overlay/scripts/php-fpm new file mode 100755 index 0000000..f9113cf --- /dev/null +++ b/rootfs/etc/s6-overlay/scripts/php-fpm @@ -0,0 +1,5 @@ +#!/command/with-contenv sh +# shellcheck shell=sh + +/usr/sbin/php-fpm7.4 --nodaemonize 2>&1 | awk '{print "[php-fpm] " $0}' + diff --git a/etc/services.d/socat/run b/rootfs/etc/s6-overlay/scripts/socat old mode 100644 new mode 100755 similarity index 87% rename from etc/services.d/socat/run rename to rootfs/etc/s6-overlay/scripts/socat index 0c547b0..8ffdd95 --- a/etc/services.d/socat/run +++ b/rootfs/etc/s6-overlay/scripts/socat @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh if [ -z "${BASESTATIONHOST}" ]; then diff --git a/etc/services.d/update_db/run b/rootfs/etc/s6-overlay/scripts/update_db old mode 100644 new mode 100755 similarity index 84% rename from etc/services.d/update_db/run rename to rootfs/etc/s6-overlay/scripts/update_db index fb9f8e0..85935c3 --- a/etc/services.d/update_db/run +++ b/rootfs/etc/s6-overlay/scripts/update_db @@ -1,4 +1,4 @@ -#!/usr/bin/with-contenv sh +#!/command/with-contenv sh # shellcheck shell=sh sleep 1h