Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish-7.2-fpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish 7.2 FPM-Alpine Image
on:
push:
paths:
- 'php7.2/fpm-alpine/**'
- '.github/workflows/publish-7.2-fpm.yml'
repository_dispatch:
types: [build_7.2_fpm]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build Image
run: ./publish-image.sh
working-directory: ./php7.2/fpm-alpine/
- name: Test 7.2 WordPress Image
run: ./workflow-test.sh ./php7.2/fpm-alpine/docker-compose.yml
shell: bash
working-directory: ./
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish 7.2 FPM Alpine Docker Hub
run: ./publish-image.sh -p
shell: bash
working-directory: ./php7.2/fpm-alpine/
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Publish 7.2 Git Package Repository
run: ./publish-image.sh -g
shell: bash
working-directory: ./php7.2/fpm-alpine/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
wordpress/
default.run.config
32 changes: 0 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,35 +214,3 @@ For more information contact [support@polyverse.io](mailto:support@polyverse.io)






# Polyscripted WordPress is built from https://github.com/docker-library/wordpress

## Maintained by: [the Docker Community](https://github.com/docker-library/wordpress)

This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`wordpress`](https://hub.docker.com/_/wordpress/) (not to be confused with any official `wordpress` image provided by `wordpress` upstream). See [the Docker Hub page](https://hub.docker.com/_/wordpress/) for the full readme on how to use this Docker image and for information regarding contributing and issues.

The [full image description on Docker Hub](https://hub.docker.com/_/wordpress/) is generated/maintained over in [the docker-library/docs repository](https://github.com/docker-library/docs), specifically in [the `wordpress` directory](https://github.com/docker-library/docs/tree/master/wordpress).

## See a change merged here that doesn't show up on Docker Hub yet?

For more information about the full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what).

For outstanding `wordpress` image PRs, check [PRs with the "library/wordpress" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fwordpress). For the current "source of truth" for [`wordpress`](https://hub.docker.com/_/wordpress/), see [the `library/wordpress` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/wordpress).

---
<<<<<<< HEAD
=======

- [![build status badge](https://img.shields.io/travis/docker-library/wordpress/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/wordpress/branches)
- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/wordpress.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/wordpress)

| Build | Status | Badges | (per-arch) |
|:-:|:-:|:-:|:-:|
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/wordpress.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/wordpress) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/wordpress.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/wordpress) | [![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/wordpress.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/wordpress) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/wordpress.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/wordpress) |
| [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/wordpress.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/wordpress) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/wordpress.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/wordpress) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/wordpress.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/wordpress) | [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/wordpress.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/wordpress) |
| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/wordpress.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/wordpress) |

<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->
>>>>>>> f6146861a38e5099a28af1c4b18c47114a918311
11 changes: 11 additions & 0 deletions default.run.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#-------------------------CONTAINER CONFIGURATION--------------------------------
export CONTAINER_NAME=wordpress
export CONTAINER_PORT=80
export HOST_PORT=8000
export CONTAINER_ADDRESS="http://localhost:$CONTAINER_PORT"


export WORDPRESS_DIR=$PWD/wordpress
export MODE=unpolyscripted


32 changes: 32 additions & 0 deletions php7.2/fpm-alpine/publish-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

set -e
image="polyverse/polyscripted-wordpress"
echo "$(date) Obtaining current git sha for tagging the docker image"
headsha=$(git rev-parse --verify HEAD)

echo "Copying scripts into current directory for docker build context..."
cp -Rp ../../scripts .

echo "Building and Tagging"
#Build and Tag
docker build -t $image:alpine-7.2-$headsha .
docker tag $image:alpine-7.2-$headsha $image:alpine-7.2
docker tag $image:alpine-7.2-$headsha $image:alpine-7.2-latest
docker tag $image:alpine-7.2-$headsha $image:latest

#Dockerhub Respository
if [[ "$1" == "-p" ]]; then
echo "Pushing to Docker Hub"
docker push $image:alpine-7.2-$headsha
docker push $image:alpine-7.2-latest
fi
#Github Container Repository
if [[ "$1" == "-g" ]]; then
echo "Pushing to Github Container Repository"
docker tag $image:alpine-7.2-$headsha ghcr.io/$image:alpine-7.2-$headsha
docker push ghcr.io/$image:alpine-7.2-$headsha
fi

echo "Removing temporary scripts"
rm -rf ./scripts
19 changes: 11 additions & 8 deletions php7.4/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ghcr.io/polyverse/ps-php7.4-buster-apache:latest

ENV PHP_EXEC=/usr/local/bin

# persistent dependencies
Expand All @@ -18,13 +17,16 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
ncat \
vim \
libmagickwand-dev \
libpng-dev \
libzip-dev \
libfreetype6-dev \
libjpeg-dev \
ncat \
cron \
incron \
vim \
git \
libmagickwand-dev \
libpng-dev \
libzip-dev \
; \
\
php -i; \
Expand Down Expand Up @@ -117,6 +119,7 @@ RUN curl -L -o /usr/local/bin/tini https://github.com/krallin/tini/releases/late

WORKDIR $POLYSCRIPT_PATH
COPY scripts/* $POLYSCRIPT_PATH/
RUN mv scramble.sh /usr/local/bin

# apache2-foreground comes from inherited container's CMD, which we chain
ENTRYPOINT ["/usr/local/bin/tini", "-g", "--", "bash", "-c"]
Expand Down
5 changes: 0 additions & 5 deletions php7.4/apache/default.run.config

This file was deleted.

3 changes: 2 additions & 1 deletion php7.4/apache/run-self-contained.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ echo "Running under mode: $MODE"
image="polyverse/polyscripted-wordpress"
echo "$(date) Obtaining current git sha for tagging the docker image"
headsha=$(git rev-parse --verify HEAD)
php_version=apache-7.4

docker run --name mysql-host -e MYSQL_ROOT_PASSWORD=qwerty -d mysql:5.7
docker run --rm -e MODE=$MODE --name wordpress -v $PWD/wordpress:/wordpress --link mysql-host:mysql -p 8000:80 ${image}:apache-7.4-${headsha}
docker run --rm -e MODE=$MODE -e CONTAINER_ADDRESS="http://localhost:80" --name wordpress -v $PWD/wordpress:/wordpress --link mysql-host:mysql -p 8000:80 ${image}:${php_version}-${headsha}
106 changes: 45 additions & 61 deletions php7.4/apache/run.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
#!/bin/bash


# 80-character wide dashes for intermittent use
# echo "--------------------------------------------------------------------------------"

CONTAINER_NAME=wordpress
php_version=apache-7.4

if [[ "$CONTAINER_NAME" == "" ]]; then
echo "No container name env variable found, defaulting to wordpress."
CONTAINER_NAME=wordpress
fi
if [[ "$CONTAINER_PORT" == "" ]]; then
echo "No override container port found, using default exposed port 80."
CONTAINER_PORT=80
fi
if [[ "$HOST_PORT" == "" ]]; then
echo "No host port env variable found, defaulting to port 8000."
HOST_PORT=8000
fi
if [[ "$CONTAINER_ADDRESS" == "" ]]; then
echo "Defaulting to localhost for cron."
CONTAINER_ADDRESS="http://localhost:$CONTAINER_PORT"
fi

function getContainerHealth {
docker inspect --format "{{.State.Health.Status}}" $1
Expand Down Expand Up @@ -87,26 +105,26 @@ else
fi

echo "---------------------------WORDPRESS DIRECTORY---------------------------------"
if [[ "$WORDPRESSDIR" == "" ]]; then
if [[ "$WORDPRESS_DIR" == "" ]]; then
echo " A Wordpress directory was not specified. Using a default directory"
echo " under the current path: $PWD/wordpress."
echo ""
echo " NOTE: You may skip this by specifying \$WORDPRESSDIR=<path>"
echo " A new installation will be created if one does not already exist."
echo ""
while true; do
read -p "Do you wish to use this wordpress directory?" yn
case $yn in
[Yy]*)
export WORDPRESSDIR=$PWD/wordpress
break
;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
read -p "Do you wish to use this wordpress directory?" yn
case $yn in
[Yy]* )
export WORDPRESS_DIR=$PWD/wordpress;
break;;
[Nn]* ) exit;;
* )
echo "Please answer yes or no.";;
esac
done
else
echo "Using wordpress installation from directory: $WORDPRESSDIR"
echo "Using wordpress installation from directory: $WORDPRESS_DIR"
fi

echo "-------------------------WORDPRESS CONFIGURATION--------------------------------"
Expand Down Expand Up @@ -158,61 +176,27 @@ else
echo "Found existing database configuration."
fi

echo "-------------------------SYSTEM CRON ----------------------------------------"
echo "For optimization a system cron is utilized for the plugin."
echo "Set CONTAINER_ADDRESS to configure this cron."
echo "To disable cron jobs set WP_DISABLE_CRON and WP_DISABLE_INCRON to true."
echo ""

echo "-------------------------WORDPRESS STARTUP--------------------------------------"
echo "$(date) Obtaining current git sha for tagging the docker image"
headsha=$(git rev-parse --verify HEAD)
if [[ "$CONTAINERPORT" == "" ]]; then
echo "No override container port found, using default exposed port 80."
CONTAINERPORT=80
fi
if [[ "$HOSTPORT" == "" ]]; then
echo "No host port env variable found, defaulting to port 8000."
HOSTPORT=8000
fi
wpcmd="docker run -t -d -e MODE=$MODE --name $CONTAINER_NAME -v $WORDPRESSDIR:/wordpress -p $HOSTPORT:$CONTAINERPORT $wpvarparams $dblink polyverse/polyscripted-wordpress:apache-7.4-${headsha} bash"
if [[ "$*" == "-f" ]]; then
echo "YES"
else
echo "NO"
fi

function startBackgroundTasks() {
if [[ $PLUGIN != "true" ]]; then
while true; do
read -p "Do you want to start dispatcher for the polyscripting plugin to allow scrambling from the wordpress plugin?"
case $yn in
[Yy]*)
docker exec -d $CONTAINER_NAME ./dispatch.sh 2323
echo "Set PLUGIN to true to skip this prompt."
break
;;
[Nn]*)
echo "To enable dispatcher in the future run: docker exec -d $CONTAINER_NAME ./dispatch.sh 2323; break;;"
break
;;
*) echo "Please answer yes or no." ;;
esac
done
else
docker exec -d $CONTAINER_NAME ./dispatch.sh 2323
fi
echo "Starting apache server inside $CONTAINER_NAME"
docker exec -e MODE=$MODE --workdir /usr/local/bin $CONTAINER_NAME ./docker-entrypoint.sh apache2-foreground
}
wpcmd="docker run -t -e MODE=$MODE -e CONTAINER_ADDRESS=$CONTAINER_ADDRESS --name $CONTAINER_NAME -v $WORDPRESS_DIR:/wordpress -p $HOST_PORT:$CONTAINER_PORT $wpvarparams $dblink polyverse/polyscripted-wordpress:$php_version-$headsha"

function startContainer() {
if [[ $(docker ps -aq -f status=exited -f name=$CONTAINER_NAME) ]]; then
echo "Existing container found, but it is stopped. Starting now."
docker start $CONTAINER_NAME
startBackgroundTasks
elif [[ $(docker ps -q -f status=running -f name=$CONTAINER_NAME) ]]; then
echo "Container already running."
echo "To start dispatcher run: 'docker exec -d $CONTAINER_NAME ./dispatch.sh 2323'"
echo "To start apache run: 'docker exec -e MODE=$MODE --workdir /usr/local/bin $CONTAINER_NAME ./docker-entrypoint.sh apache2-foreground;'"
else
eval $wpcmd
startBackgroundTasks
fi
if [[ $(docker ps -aq -f status=exited -f name=$CONTAINER_NAME) ]]; then
echo "Existing container found, but it is stopped."
echo "Restart, rename, or delete existing container."
elif [[ $(docker ps -q -f status=running -f name=$CONTAINER_NAME) ]]; then
echo "Container already running."
else
eval $wpcmd;
fi
}

echo "About to run this command (you may copy/store it to run directly):"
Expand Down
2 changes: 2 additions & 0 deletions php8.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ghcr.io/polyverse/ps-php8.0-buster-apache:latest

ENV PHP_EXEC=/usr/local/bin

ENV PHP_EXEC=/usr/local/bin

# persistent dependencies
RUN set -eux; \
apt-get update; \
Expand Down
4 changes: 2 additions & 2 deletions php8.0/apache/run-self-contained.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Running under mode: $MODE"
image="polyverse/polyscripted-wordpress"
echo "$(date) Obtaining current git sha for tagging the docker image"
headsha=$(git rev-parse --verify HEAD)

php_version=apache-7.4

arch_name="$(uname -m)"

Expand All @@ -20,4 +20,4 @@ else
fi

docker run $platform --name mysql-host -e MYSQL_ROOT_PASSWORD=qwerty -d mysql:5.7
docker run $platform --rm -e MODE=$MODE --name wordpress -v $PWD/wordpress:/wordpress --link mysql-host:mysql -p 8000:80 ${image}:apache-8.0-${headsha}
docker run $platform --rm -e MODE=$MODE -e CONTAINER_ADDRESS="http://localhost:80" --name wordpress -v $PWD/wordpress:/wordpress --link mysql-host:mysql -p 8000:80 $image:$php_version-$headsha
Loading