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 97c72f7..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.2 - # travis encrypt DOCKER_USERNAME=user - # travis encrypt DOCKER_PASSWORD=pass - # Must be regenerated when repository name/owner changes - # DOCKER_USERNAME - - secure: "DC6uq+guleW95fBkEGRRQgHqNrZJmZFFbg0uaeQARDQcy3AZMnHmpFTI6MIlJERCGQ4SACZSUV4oPMPRo78/a3L0fSdSaijLp7hlGxEu8gJYm0saJVliPZJblgvxVICqBgUr9OoV5kxn/L8xPxy8eqdLJs5TwJ2+IDX3gUPvBeN6U21xvwdEA44DwFJpYJ1pt/GoJ6CcsgQu3uJ4MHKAH/HFXxk6z/INJlIqOJnVeEJoJBHGOMb1rp8DnxDpmcuG1G0IkZqv9abVYePWdcl86TOzHHQyjvsI86neQYX6Tr1P0/y+R8gPMzn98fTcNXa33z8aJydRCs8GOQmQNViP1eLTi4a+n+lEA6J98VUBF+LuqWE5+WARczfwWyNE2qsQxjm4dDAfkSIK51Pk7tRs+pIesthmAQusp0TeM6k6O3MUT8ZNbk9dGoW8yguPoABzZgaTBvWvLwbBfU6kg/Vdjk6kuqAB4w2t7alXVYefBsNQmoHgaMNp84nbPbSbliPFMgsgdKgGfRMMUc7lLizpRuOxHVluoDKJNBauEdrJiBufWZWCQvw/TahegeC4owVT6E9lWgsH4mMhp/BPiZyeAmGcxyPhq9FbvTK9CxkLYYeofaJh47yvc6sN5nvH/IwHRPsnq1XJwW7ODPw4DdBPeLBxnMs9WETwkmGfe6ZncdE=" - # DOCKER_PASSWORD - - secure: "NetFHs4D7GOsuBAx72eEqoM8RiJ/+3mM2iycdMkDjHm1dIv+NHIXh2Y0tbQxiSqWS1LTcCC12zW0bnVWPVHY7C7lEIAtvEvtAHPS0PMv+a3SkGnByIMDFhGUuwnr/dgcfBUnOgw/Ai+PBOrAPfesAZd/rZ4Gbru+WZpNatlJhAoPHMdUBeqWBz7pouldMOAwO9bT7fWa7z3FaFPO2fbCq85bT15uVkKBFc/SkSgvbywDdT053zkrKhrWPQHWZxMOHdxsIimbvFEYzoM3s6IkMwVhFcOqgPqlokhu3MCAJrb1V6554gM7EMhuYqyfFeAB2i/4P5q7yRZeJQ5wm9Zf5D7ywUprFgT3YjsonR7H+2CCZAZpiXg01fl/LC3Mg6IKEL0/726lfu0kevHH60x2oq86r32ioa3AyRmtC/wu9nbm5ey1MLb/BBI/VH1Cv2xdwqgthrikXlt7/KlKN/e+UlS0Dn+GXomN09xlV2COD4YLEVgqK3bXDt1s6xQZ9F//Lt4HTSp6XJw8iuQyV4D5fvTGxvrBervptVlEpfT67dLDpEFm3mS0a5bp2yc0YY/AjKlFM8rc64k2Tu573bdDoPkbEDGgBv8ZGp4XSWVbmfScRZcsJSGdXvntk634kGgAgb8YwP8wR82dCUGjVyrjaljrS5+g5+EQJm2DmXgzRQ4=" - 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 0e26015..f0a9ef0 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 \ @@ -76,7 +77,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 1c7cc22..e0d25ec 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,93 @@ -image = devilbox/apache-2.2 +ifneq (,) +.error This Makefile requires GNU Make. +endif + + +# ------------------------------------------------------------------------------------------------- +# Docker configuration +# ------------------------------------------------------------------------------------------------- + +IMAGE = devilbox/apache-2.2 +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 435190d..6057a8a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # Apache 2.2 Docker image -[![Build Status](https://travis-ci.org/devilbox/docker-apache-2.2.svg?branch=master)](https://travis-ci.org/devilbox/docker-apache-2.2) +[![lint](https://github.com/devilbox/docker-apache-2.2/workflows/lint/badge.svg)](https://github.com/devilbox/docker-apache-2.2/actions?query=workflow%3Alint) +[![build](https://github.com/devilbox/docker-apache-2.2/workflows/build/badge.svg)](https://github.com/devilbox/docker-apache-2.2/actions?query=workflow%3Abuild) +[![nightly](https://github.com/devilbox/docker-apache-2.2/workflows/nightly/badge.svg)](https://github.com/devilbox/docker-apache-2.2/actions?query=workflow%3Anightly) + [![release](https://img.shields.io/github/release/devilbox/docker-apache-2.2.svg)](https://github.com/devilbox/docker-apache-2.2/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.2-red.svg)](https://github.com/devilbox/docker-apache-2.2) 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 102d2bb..2342dac 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 e696f5f..e376755 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__