diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..28e1a1a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,163 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: build + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + # Runs on Push + push: + + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- +jobs: + build: + name: "[ HTTPD ]" + runs-on: ubuntu-latest + steps: + + # ------------------------------------------------------------ + # Setup repository + # ------------------------------------------------------------ + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set variables + id: vars + run: | + + # Retrieve git info (tags, etc) + git fetch --all + + # Branch, Tag or Commit + GIT_TYPE="$( \ + curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ + | sh \ + | grep '^GIT_TYPE' \ + | sed 's|.*=||g' \ + )" + # Branch name, Tag name or Commit Hash + GIT_SLUG="$( \ + curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ + | sh \ + | grep '^GIT_NAME' \ + | sed 's|.*=||g' \ + )" + # Docker Tag + if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then + DOCKER_TAG="latest" + else + DOCKER_TAG="${GIT_SLUG}" + fi + + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + # Export variable + # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + + + # ------------------------------------------------------------ + # Build + # ------------------------------------------------------------ + - name: Build + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + retry make build + env: + RETRIES: 20 + PAUSE: 10 + + # ------------------------------------------------------------ + # Test + # ------------------------------------------------------------ + - name: Test Docker Image + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + retry make test + env: + RETRIES: 20 + PAUSE: 10 + + + # ------------------------------------------------------------ + # Deploy + # ------------------------------------------------------------ + - name: Publish images (only repo owner) + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + # Tag image + retry make tag TAG=${DOCKER_TAG} + docker images + + # Login and Push + retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} + retry make push TAG=${DOCKER_TAG} + + env: + RETRIES: 20 + PAUSE: 10 + # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions + if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id + && ( + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) + ) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..5290e4c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: lint + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs on Pull Requests + pull_request: + + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- +jobs: + lint: + name: "Lint" + runs-on: ubuntu-latest + steps: + # ------------------------------------------------------------ + # Setup repository + # ------------------------------------------------------------ + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + # ------------------------------------------------------------ + # Lint repository + # ------------------------------------------------------------ + - name: Lint workflow + run: | + make lint-workflow diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..e5ec9e8 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,169 @@ +--- + +# ------------------------------------------------------------------------------------------------- +# Job Name +# ------------------------------------------------------------------------------------------------- +name: nightly + + +# ------------------------------------------------------------------------------------------------- +# When to run +# ------------------------------------------------------------------------------------------------- +on: + # Runs daily + schedule: + - cron: '0 0 * * *' + + +# ------------------------------------------------------------------------------------------------- +# What to run +# ------------------------------------------------------------------------------------------------- +jobs: + nightly: + name: "[ HTTPD ] (ref: ${{ matrix.refs }})" + runs-on: ubuntu-latest + strategy: + fail-fast: False + matrix: + refs: + - 'master' + - '0.36' + steps: + + # ------------------------------------------------------------ + # Setup repository + # ------------------------------------------------------------ + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + ref: ${{ matrix.refs }} + + - name: Set variables + id: vars + run: | + + # Retrieve git info (tags, etc) + git fetch --all + + # Branch, Tag or Commit + GIT_TYPE="$( \ + curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ + | sh \ + | grep '^GIT_TYPE' \ + | sed 's|.*=||g' \ + )" + # Branch name, Tag name or Commit Hash + GIT_SLUG="$( \ + curl -sS https://raw.githubusercontent.com/cytopia/git-tools/master/git-info.sh \ + | sh \ + | grep '^GIT_NAME' \ + | sed 's|.*=||g' \ + )" + # Docker Tag + if [ "${GIT_TYPE}" = "BRANCH" ] && [ "${GIT_SLUG}" = "master" ]; then + DOCKER_TAG="latest" + else + DOCKER_TAG="${GIT_SLUG}" + fi + + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + # Export variable + # https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#environment-files + echo "GIT_TYPE=${GIT_TYPE}" >> ${GITHUB_ENV} + echo "GIT_SLUG=${GIT_SLUG}" >> ${GITHUB_ENV} + echo "DOCKER_TAG=${DOCKER_TAG}" >> ${GITHUB_ENV} + + + # ------------------------------------------------------------ + # Build + # ------------------------------------------------------------ + - name: Build + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + retry make build + env: + RETRIES: 20 + PAUSE: 10 + + # ------------------------------------------------------------ + # Test + # ------------------------------------------------------------ + - name: Test Docker Image + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + retry make test + env: + RETRIES: 20 + PAUSE: 10 + + + # ------------------------------------------------------------ + # Deploy + # ------------------------------------------------------------ + - name: Publish images (only repo owner) + run: | + retry() { + for n in $(seq ${RETRIES}); do + echo "[${n}/${RETRIES}] ${*}"; + if eval "${*}"; then + echo "[SUCC] ${n}/${RETRIES}"; + return 0; + fi; + sleep ${PAUSE}; + echo "[FAIL] ${n}/${RETRIES}"; + done; + return 1; + } + + # Output + echo "GIT_TYPE=${GIT_TYPE}" + echo "GIT_SLUG=${GIT_SLUG}" + echo "DOCKER_TAG=${DOCKER_TAG}" + + # Tag image + retry make tag TAG=${DOCKER_TAG} + docker images + + # Login and Push + retry make login USER=${{ secrets.DOCKERHUB_USERNAME }} PASS=${{ secrets.DOCKERHUB_PASSWORD }} + retry make push TAG=${DOCKER_TAG} + + env: + RETRIES: 20 + PAUSE: 10 + # https://help.github.com/en/github/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#functions + if: github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id + && ( + (github.event_name == 'schedule' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))) + || + (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-')) + ) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8c7aa50..0000000 --- a/.travis.yml +++ /dev/null @@ -1,101 +0,0 @@ -### -### Enable sudo (required for docker service) -### -sudo: required - - -### -### Language -### -language: python - - -### -### Add services -### -services: - - docker - - -### -### Build Matrix definition -### -env: - global: - - IMAGE=devilbox/apache-2.4 - # travis encrypt DOCKER_USERNAME=user - # travis encrypt DOCKER_PASSWORD=pass - # Must be regenerated when repository name/owner changes - # DOCKER_USERNAME - - secure: "kxNYavMNjgcnnNg56UZItUSijkFl7Mu2+V0GQ/jFrUG5nFuWnIm7K+AJs96V39cOhybegNYFbEHpLAKVmjQ6BezzIcubVfIW3PfMlI5p0sxITowws89LoheSTKTwOdcQfh8BU7M0IUtvocRG/+jRsrUbgQu3DBOWRxsTWiKMgXjoiPUnlwx5wr4Hyskh8MxUxa41JdiRQYfQawvRiXxUkkcbwVAdvRtW+P03t18gMXqAMxQ0XnjKiYJQbHhnHeITyeRHWEGnxXiQESikzjW62NhKgyiZxOgCSc14n0LP4dzdRaD2jo62zfKCyBp6UmkhBMc3gIYiGCSgJLpH2yHSQhY7FxNN/JQZ/S6UruYbIhUutqNG928QPEydJyLCgqSAn4u2kv5H2YusXPPY3SrMZGPj+7pCAJmnX7zkHGdqS0IL3BVkbE13cXKxZ66yrTfIs6B278dIr15TVJd92Dql+eHb7wFypJqkHE8+VdCj7JRdQyH2fsAY0oXxwSIYRqtHQFXPa9bxVYd1v7IH7lJllZP+jW3EhRMOc5i9DOWJ525tDiBAdBJuCafAoN76fIoHiVUesaZVatseSaEW7uV/noFKALYSpIHcdZsxI3cYrgqYRCMBXc4MZdFmxk4/sT4nWgaSbjb/V5mtdlHgYTxVX5Ocd1Q2Er/3yfiOla0jgOc=" - # DOCKER_PASSWORD - - secure: "oNvVKAtmlzCFCXwiZZ3DN73wMOwz7MiXOLZNZLvp0xU945JK55hNYENo+bZiduIkCAozDC0g4TbxZPrfo79e0I1JopeZXngE+KNTqCLGY+CCTRifYX9oWsCbaVDbjy2kf835aocQhciEa32TbG9GFxR/ZkMfA1wVnb4/Fb5+xzxJDz9Ks+mQs/B2sac9rzUTSZzp62xCMkPmBIp+oCy0xyZMyvNb/Q0ZxSD/Q3Z4rn0sOoOm56NnNFrVSyqGA7xl2S7OwvB9MAlsu8cnZPOq/CDjfLYhgaO6uA2nqPP7ZOVcq62pfqAt2fdF4/JU7TjFGPGGtxGF3yAKC+JGVhhcu/6yKQhIBeoaAJpUN1XMr1DGLP584yC/wtx5JfNebSIuretGfmwRklgRurQbfSjTcJf9mIehihqprW4euVXbtHWEhnfQY/wL3bP+7dT8CWxnphQs8WzshrghPLDVL0a9j9z/BsMMpneC6yOOBuKU4Z3st3h8dtFqBE2xgWrg0L6IsRlB1ydMcZ7aE1C9FZPKaAbhDCufG7G+cGhq9I8oUVDVcn1ltJxdNbpGy/RRw9pmWCEfzqfAJsOS1LQdIcRqvGUgHT/M9O36MaCtu86aZtYPmgUeXPVAKbu1xbrL8TfF8gBQAeQIGmxdV6i5ilxSo2X9mgDbCckEz8zIIVI3qe0=" - matrix: - - TEST=0 - - TEST=1 - - -### -### Stage definitions -### -stages: - - test - - deploy - - -### -### Global for all stages -### -install: - # Get newer docker version - - max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get update; then break; else i=$((i+1)); fi done - - max=100; i=0; while [ $i -lt $max ]; do if sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce; then break; else i=$((i+1)); fi done - - docker version -script: - - make build - - make test ARG=${TEST} - - -### -### Job definitions -### -jobs: - include: - # Final deploy stage - - stage: deploy - env: TEST= - before_script: - - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - if [ -n "${TRAVIS_TAG}" ]; then - docker build --no-cache=true -t "${IMAGE}:${TRAVIS_TAG}" . && - docker images; - elif [ "${TRAVIS_BRANCH}" == "master" ]; then - docker build --no-cache=true -t "${IMAGE}:latest" . && - docker images; - elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then - docker build --no-cache=true -t "${IMAGE}:${TRAVIS_BRANCH}" . && - docker images; - else - echo "Skipping branch ${TRAVIS_BRANCH}"; - fi - fi - script: - # Push to docker hub on success - - if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin && - if [ -n "${TRAVIS_TAG}" ]; then - echo "Pushing ${IMAGE}:${TRAVIS_TAG}" && - docker push "${IMAGE}:${TRAVIS_TAG}" && - docker tag "${IMAGE}:${TRAVIS_TAG}" "${IMAGE}:latest" && - echo "Pushing ${IMAGE}:latest" && - docker push "${IMAGE}:latest"; - elif [ "${TRAVIS_BRANCH}" == "master" ]; then - echo "Pushing ${IMAGE}:latest" && - docker push "${IMAGE}:latest"; - elif [[ ${TRAVIS_BRANCH} =~ ^(release-[.0-9]+)$ ]]; then - echo "Pushing ${IMAGE}:${TRAVIS_BRANCH}" && - docker push "${IMAGE}:${TRAVIS_BRANCH}"; - else - echo "Skipping branch ${TRAVIS_BRANCH}"; - fi - fi diff --git a/Dockerfile b/Dockerfile index 3bb121b..6abdda9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,8 @@ LABEL \ ### ### Build arguments ### -ARG VHOST_GEN_GIT_REF=0.16 +ARG VHOST_GEN_GIT_REF=1.0.3 +ARG WATCHERD_GIT_REF=v1.0.2 ARG CERT_GEN_GIT_REF=0.7 ENV BUILD_DEPS \ @@ -58,7 +59,7 @@ RUN set -x \ && chmod +x /usr/bin/cert-gen \ \ # Install watcherd - && wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/v1.0.1/watcherd \ + && wget --no-check-certificate -O /usr/bin/watcherd https://raw.githubusercontent.com/devilbox/watcherd/${WATCHERD_GIT_REF}/watcherd \ && chmod +x /usr/bin/watcherd \ \ # Clean-up diff --git a/Makefile b/Makefile index 63c8d96..53195dc 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,93 @@ -image = devilbox/apache-2.4 +ifneq (,) +.error This Makefile requires GNU Make. +endif + + +# ------------------------------------------------------------------------------------------------- +# Docker configuration +# ------------------------------------------------------------------------------------------------- + +IMAGE = devilbox/apache-2.4 +TAG = latest + + +# ------------------------------------------------------------------------------------------------- +# Default Target +# ------------------------------------------------------------------------------------------------- help: - @printf "%s\n" "make build: Build" - @printf "%s\n" "make rebuild: Rebuild" - @printf "%s\n" "make test: Test" + @echo "lint Lint project files and repository" + @echo "build Build Docker image" + @echo "rebuild Build Docker image without cache" + @echo "test Test built Docker image" + @echo "update-readme Update README.md with PHP modules" + @echo "tag [TAG=...] Retag Docker image" + @echo "login USER=... PASS=... Login to Docker hub" + @echo "push [TAG=...] Push Docker image to Docker hub" -build: pull - docker build -t $(image) . - cd build; ./gen-readme.sh $(image) +# ------------------------------------------------------------------------------------------------- +# Lint Targets +# ------------------------------------------------------------------------------------------------- -rebuild: pull - docker build --no-cache -t $(image) . - cd build; ./gen-readme.sh $(image) +lint: lint-workflow + +lint-workflow: + @\ + GIT_CURR_MAJOR="$$( git tag | sort -V | tail -1 | sed 's|\.[0-9]*$$||g' )"; \ + GIT_CURR_MINOR="$$( git tag | sort -V | tail -1 | sed 's|^[0-9]*\.||g' )"; \ + GIT_NEXT_TAG="$${GIT_CURR_MAJOR}.$$(( GIT_CURR_MINOR + 1 ))"; \ + if ! grep 'refs:' -A 100 .github/workflows/nightly.yml \ + | grep " - '$${GIT_NEXT_TAG}'" >/dev/null; then \ + echo "[ERR] New Tag required in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \ + exit 1; \ + else \ + echo "[OK] Git Tag present in .github/workflows/nightly.yml: $${GIT_NEXT_TAG}"; \ + fi + + +# ------------------------------------------------------------------------------------------------- +# Build Targets +# ------------------------------------------------------------------------------------------------- + +build: pull-base-image + docker build -t $(IMAGE) . + ./build/gen-readme.sh $(IMAGE) + +rebuild: pull-base-image + docker build --no-cache -t $(IMAGE) . + ./build/gen-readme.sh $(IMAGE) -tag: - docker tag $(image) $(image):$(ARG) + +# ------------------------------------------------------------------------------------------------- +# Test Targets +# ------------------------------------------------------------------------------------------------- test: - .ci/start-ci.sh $(image) $(ARG) + .ci/start-ci.sh $(IMAGE) $(ARG) + + +# ------------------------------------------------------------------------------------------------- +# Deploy Targets +# ------------------------------------------------------------------------------------------------- + +tag: + docker tag $(IMAGE) $(IMAGE):$(TAG) + +login: + yes | docker login --username $(USER) --password $(PASS) + +push: + @$(MAKE) tag TAG=$(TAG) + docker push $(IMAGE):$(TAG) + + +# ------------------------------------------------------------------------------------------------- +# Helper Targets +# ------------------------------------------------------------------------------------------------- + +enter: + docker run --rm --name $(subst /,-,$(IMAGE)) -it --entrypoint=bash $(ARG) $(IMAGE) -pull: - docker pull $(shell grep 'FROM' Dockerfile | sed 's/^FROM//g'; ) +pull-base-image: + @docker pull $(shell grep FROM Dockerfile | sed 's/^FROM\s*//g';) diff --git a/README.md b/README.md index 1d31604..cd40dcb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Apache 2.4 Docker image -[![Build Status](https://travis-ci.org/devilbox/docker-apache-2.4.svg?branch=master)](https://travis-ci.org/devilbox/docker-apache-2.4) +[![lint](https://github.com/devilbox/docker-apache-2.4/workflows/lint/badge.svg)](https://github.com/devilbox/docker-apache-2.4/actions?query=workflow%3Alint) +[![build](https://github.com/devilbox/docker-apache-2.4/workflows/build/badge.svg)](https://github.com/devilbox/docker-apache-2.4/actions?query=workflow%3Abuild) +[![nightly](https://github.com/devilbox/docker-apache-2.4/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-apache-2.4/actions?query=workflow%3Anightly) + [![release](https://img.shields.io/github/release/devilbox/docker-apache-2.4.svg)](https://github.com/devilbox/docker-apache-2.4/releases) [![Join the chat at https://gitter.im/devilbox/Lobby](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Github](https://img.shields.io/badge/github-docker--apache--2.4-red.svg)](https://github.com/devilbox/docker-apache-2.4) @@ -261,9 +264,9 @@ It allows any of the following combinations: ## Version ``` -Server version: Apache/2.4.41 (Unix) -Server built: Nov 23 2019 00:34:14 -Server's Module Magic Number: 20120211:88 +Server version: Apache/2.4.46 (Unix) +Server built: Dec 11 2020 12:17:58 +Server's Module Magic Number: 20120211:93 Server loaded: APR 1.6.5, APR-UTIL 1.6.1 Compiled using: APR 1.6.5, APR-UTIL 1.6.1 Architecture: 64-bit diff --git a/build/gen-readme.sh b/build/gen-readme.sh index 6c9fe11..9229ba1 100755 --- a/build/gen-readme.sh +++ b/build/gen-readme.sh @@ -10,7 +10,7 @@ IMAGE="${1}" ### ### Retrieve information afterwards and Update README.md ### -INFO="$( docker run -it --rm --entrypoint=httpd ${IMAGE} -V 2>&1 | tr -d "\r" )" +INFO="$( docker run --rm --entrypoint=httpd "${IMAGE}" -V 2>&1 | tr -d '\r' )" echo "${INFO}" sed -i'' '/##[[:space:]]Version/q' "${CWD}/README.md" diff --git a/data/create-vhost.sh b/data/create-vhost.sh index b8f58d7..7c8d0bb 100755 --- a/data/create-vhost.sh +++ b/data/create-vhost.sh @@ -30,7 +30,7 @@ if [ "${GENERATE_SSL}" = "1" ]; then fi fi -cmd="vhost_gen.py -p \"${VHOST_PATH}\" -n \"${VHOST_NAME}\" -c /etc/vhost-gen/mass.yml -o \"${VHOST_TPL}\" -s ${VERBOSE} -m ${GEN_MODE}" +cmd="vhost-gen -p \"${VHOST_PATH}\" -n \"${VHOST_NAME}\" -c /etc/vhost-gen/mass.yml -o \"${VHOST_TPL}\" -s ${VERBOSE} -m ${GEN_MODE}" if [ -n "${VERBOSE}" ]; then echo "\$ ${cmd}" fi diff --git a/data/docker-entrypoint.d/07-vhost-gen.sh b/data/docker-entrypoint.d/07-vhost-gen.sh index 44f22ac..9f4fb2c 100755 --- a/data/docker-entrypoint.d/07-vhost-gen.sh +++ b/data/docker-entrypoint.d/07-vhost-gen.sh @@ -92,7 +92,7 @@ vhost_gen_generate_main_vhost() { else verbose="" fi - run "vhost_gen.py -n localhost -p ${docroot} -c ${config} -o ${template} ${verbose} -d -s -m ${ssl_type}" "${debug}" + run "vhost-gen -n localhost -p ${docroot} -c ${config} -o ${template} ${verbose} -d -s -m ${ssl_type}" "${debug}" fi } diff --git a/data/vhost-gen/main.yml b/data/vhost-gen/main.yml index 3944d55..16eb61a 100644 --- a/data/vhost-gen/main.yml +++ b/data/vhost-gen/main.yml @@ -77,13 +77,13 @@ vhost: ssl_port: 443 # The virtual host name is specified as an command line argument - # to vhost_gen.py via '-n', however it is possible + # to vhost-gen via '-n', however it is possible # to prepend and/or append additional name strings. name: prefix: suffix: # The document root directory is specified as an command line argument - # to vhost_gen.py via '-p', however it is possible + # to vhost-gen via '-p', however it is possible # to prepend another subdirectory here. docroot: suffix: diff --git a/data/vhost-gen/mass.yml b/data/vhost-gen/mass.yml index 42f1e77..f827490 100644 --- a/data/vhost-gen/mass.yml +++ b/data/vhost-gen/mass.yml @@ -77,13 +77,13 @@ vhost: ssl_port: 443 # The virtual host name is specified as an command line argument - # to vhost_gen.py via '-n', however it is possible + # to vhost-gen via '-n', however it is possible # to prepend and/or append additional name strings. name: prefix: suffix: __TLD__ # The document root directory is specified as an command line argument - # to vhost_gen.py via '-p', however it is possible + # to vhost-gen via '-p', however it is possible # to prepend another subdirectory here. docroot: suffix: __DOCROOT_SUFFIX__