Skip to content

Commit

Permalink
Release/v3.0 (#207)
Browse files Browse the repository at this point in the history
* Improved query accuracy

* Removed sort

* Removed version data

* Changed docker repo

* Restructured docker repository name

* Moved readme control to beta for now

* Improved error handling

* Removed unset check

* Added dev script

* Removed copy command

* Fixed merging of YML

* Disabled debugging

* Fixed merge

* Remove debug

* Improved dependency install

* Fixed structure of dev command

* Improved documentation

* Initial commit of S6

* Initial commit of other variations

* Added early exits

* Fixed separation of commands

* Added init script

* Removed whitespace

* Sort scripts to run by numerical order

* Fixed execution of commands

* Improved development script

* Removed debug

* WIP migrated FPM and NGINX over

* Removed wget dependency

* Fixed reference to php-fpm

* Changed shells

* Fixed dependency installer

* WIP - adding nginx

* Converted logic to shell

* Added trace

* Working NGINX

* Working NGINX-FPM

* Working Alpine support

* Functioning Alpine image

* Added special thanks

* Cleaned up error output

* Removed whitespace

* Fixed error reference

* Remove unnecessary code

* WIP Nginx Unit

* Set script name

* Renamed nginx-unit to unit

* Fixed base image reference

* Improved error output

* Working NGINX Unit with SSL-Off

* Cleaned up output

* Explicit script names

* Added debug

* WIP Unit Mixed

* Renamed SSL to self-signed

* Working SSL configuration

* Changed to serversideup/php

* Changed docker-php-pro to docker-php-serversideup

* Fixed illegal character error

* Added minimum TLS

* Updated ciphers

* Working NGINX Unit configuration

* Changed name reference

* Changed branch name for beta

* Added usage notes

* Refactored tag script

* Renamed base config file

* Renamed base config

* Moved RC and added usage instructions

* Removed whitespace

* Removed whitespace

* Require base config

* Clarified defaults

* Renamed DEPENDENCY_PACKAGES_BOOKWORM to DEPENDENCY_PACKAGES_DEBIAN

* Refactored and improved readability

* Added base operating systems

* Updated php-version.yml structure

* Added base os for RC

* Refactored assemble-docker-tags

* Adjusted Base OS Logic

* Fixed variable name

* Variable name change

* Pretty print

* Changed permissions

* Added help menu

* Fixed help menu

* Remove help tag

* Added fpm configs

* Added default variables

* Organized and renamed variables for better clarity

* Remove PHP open base dir

* Fixed permissions on configs

* Moved PHP_SESSION_COOKIE_SECURE to ini. Fixes #105. Ref #107

* Moved init scripts to be at a higher number

* Added PHP_ERROR_LOG

* Changed order of execution for debug

* Changed debug output order

* Removed default base os

* Prepared for push of images

* Default to any debian os

* Updated landing page

* Updated readme

* Improved NGINX Unit description

* Updated features

* Improved output

* Added newer versions

* Added build process

* Removed fpm-apache for now

* Updated NGINX Unit version to 1.31.1

* Added variations from config file

* Fixed tagging issues for default_base_os

* Added comment for why we can't include an alpine version of Unit

* Ignore DS_Store files

* Added PHP extensions

* Removed whitespace

* Commented out sqllit

* Specified branch due to cloudflare/pages-action#97

* Update s6-overlay version to v3.1.6.2

* Updated comparison and moved S6 overlay to its own page

* Added APP_BASE_DIR

* Clarified release notes location

* Started migration guide

* Removed whitespace

* Update migration guide with v3 changes

* Updated Laravel automations

* Fixed heading reference

* Add branch parameter to Cloudflare deployment

* Cleaned up GitHub Action names

* Added skip-download option

* Temporarily set skip download

* Add expanded Laravel automations

* Clarified output

* Fix autorun Laravel migration to true

* Update PHP Docker Images and Add New Features

* Clarified comment

* Enabled downloads again

* Add PHP 8.3 with Alpine and Bookworm support

* Default to 8.3

* Added debug mode

* Moved debug mode to entrypoint

* Update Dockerfile and entrypoint scripts

* Added labels and ability to set repo versions

* Adjusted argument order

* Update environment variable specification

* Update REPOSITORY_BUILD_VERSION to include GIT
Short SHA and GitHub Run ID

* Update Dockerfile comments for CLI and FPM
variations

* Update PHP Docker Images description

* Add explanation for "Optimized for Laravel &
WordPress" in getting started guide

* Simplified checkout process

* Added ability to push to GHCR

* Add multi-arch support and published registry URLs

* Remove Discourse link

* Updated installation instructions

* Update upgrade guide with version selection
details

* Add links to view available images and tags

* Update installation.md with information about
selecting the version of PHP

* Update link to guide on selecting the right image

* Updated contribution guide

* Update docker-compose.yml to include .dockerignore
file

* Add composer support

* Set S6 Overlay version in variable instead of file

* Update project credits and special thanks

* Update title in marketing layout

* Adjusted default PHP extensions

* Added $build_major_version-$build_base_os tag

* Add default entrypoint scripts and disable default
configuration

* Fix typo in default configurations

* Add guide for migrating from official PHP Docker
images

* Fix missing image tag and add link to installation
guide

* Update PHP image migration guide

* Add default environment variable specification

* Add guide on changing common PHP settings

* Remove customizing the image guide

* Add migration guide from v2 to v3

* Update Docker Compose and add Dockerfile for
installing additional PHP extensions

* Fix image tag not found issue in older versions of
PHP

* Add instructions for rebuilding Docker image on
Docker Compose initialization

* Add install-php-extensions support

* Refactor Docker tag generation logic

* WIP of SSL and start up scripts

* Docs Upgrade (#245)

* Upgraded to Nuxt 3.8

* Added about images and content ref #238

* Updated to H1 Title

* Removed methods for SEO data

* Added OG Image template

* Cleaned up SEO

* Fixed undefined page variable

* Added sign up form

* Added nvm

* Add Node.js setup and update build process

* Update link to customizations guide

* Update environment name in marketing site preview
workflow

* Updated to base 64

* Update environment name in
action_marketing-site-publish.yml

* Add BASE_PATH to .env.example

* Add SSL configuration options

* Update SSL configuration options

* Update ogImage and twitterImage URLs in marketing
layout

* Allow for nuxt base url to be null

* Adjusted w and h of image

---------

Co-authored-by: Jay Rogers <[email protected]>

* Update SSL configuration

* Updated logo

* Update PHP patch versions

* Fixed code highlights

* Update SSL configuration and provide examples for
self-signed and custom certificates

* Add note about php.ini in
changing-common-php-settings.md

* Update Dockerfile versions and install additional
PHP extensions

* Add guide for adding custom startup scripts

* Organized variables better

* Update migration guide with v3 changes

* Update PHP installation instructions and remove
deprecated features

* Removed arrow for compatibility reasons

* Update link to discussion

* Update PHP Docker Images with improved
customization

* Added PHP 8.3 support

* Update description in index.md file

* Update description of serversideup/php Docker
images

* Update PHP Docker Images name

* Changed to PNG image

* Update ogImageHeight in marketing layout

* Update ogDescription and twitterDescription in
marketing layout

* Update social image file type

* Update social image

* Adjusted OG image template

* Adjusted borders

* Update border and rounded styles in OgImage
component

* Update command reference in PHP Docker image

* Updated favicon Url ref #251

* Add PHP_OPEN_BASEDIR environment variable to Dockerfiles. Fixes #258

* Add port exposure for HTTP and HTTPS. Fixes #260

* Add PHP_MAX_INPUT_TIME environment variable. Fixes #257

* Added ZIP to Debian images. Fixes #261

* Add WORKDIR instruction. Fixes #263

* Update environment names for marketing site workflows

* Test CI

* CI test 2

* Revert environment names

* Cleaned up environment names

* CI test 1

* Remove testing

* Update PHP_EXT_INSTALLER_VERSION to 2.1.71

* Update PHP_EXT_INSTALLER_VERSION to 2.1.73

* Update Docker actions to latest versions

* Add prefix option for Docker image tag

* Add composer cache directory creation and ownership

* Added docker-php-serversideup-set-id script

* Removed --chown flag. Fixes #265

* Added video embed component

* Added Book & updated header

* Fix typo

* Fixed code execution

* Improved s6-init build process

* Added Dockerfile support

* Added S6 overlay script customization

* Add book recommendation for building multi-platform browser extensions

* Update menu link to Bugflow and change "Books" to "Products"

* Added automated checks to ensure database connection is alive before running migrations

* Added AUTORUN_LARAVEL_MIGRATION_TIMEOUT. Default timeout of 30 seconds

* Update PHP_EXT_INSTALLER_VERSION to 2.1.76

* Improved test connection to database. Fixes #279

* Upgraded to actions/checkout@v4

* Prepare for merge

* Update PHP patch versions in base config

---------

Co-authored-by: Dan Pastori <[email protected]>
  • Loading branch information
jaydrogers and danpastori authored Feb 5, 2024
1 parent c22a75d commit 20ecec1
Show file tree
Hide file tree
Showing 178 changed files with 11,412 additions and 4,953 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.DS_Store
14 changes: 14 additions & 0 deletions .github/workflows/action_marketing-site-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Site Deployment - Preview 👨‍🔬

on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- docs/**

jobs:
publish-preview-site:
uses: ./.github/workflows/service_deploy-static-site.yml
secrets: inherit
with:
environment-name: 'docker-php (Preview)'
14 changes: 14 additions & 0 deletions .github/workflows/action_marketing-site-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Site Deployment - Production 🚀
on:
push:
branches:
- main
paths:
- docs/**

jobs:
publish-production-site:
secrets: inherit
uses: ./.github/workflows/service_deploy-static-site.yml
with:
environment-name: 'docker-php (Production)'
20 changes: 20 additions & 0 deletions .github/workflows/action_publish-beta-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker Publish (Beta Images)

on:
workflow_dispatch:
push:
branches:
- main
paths:
- src/**
- .github/workflows/**
- scripts/**
schedule:
- cron: '0 8 * * 1'

jobs:
build-beta-images:
uses: ./.github/workflows/service_docker-build-and-publish.yml
with:
tag-prefix: "beta-"
secrets: inherit
16 changes: 16 additions & 0 deletions .github/workflows/action_publish-production-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker Publish (Production Images)

on:
workflow_dispatch:
release:
types: [released]
# Commenting out until 3.x is launched
# schedule:
# - cron: '0 8 * * 2'

jobs:
build-production-images:
uses: ./.github/workflows/service_docker-build-and-publish.yml
with:
tag-prefix: ''
secrets: inherit
65 changes: 0 additions & 65 deletions .github/workflows/publish_docker-images-production.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/scheduled-task_update-sponsors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Generate Sponsors 💖
uses: JamesIves/github-sponsors-readme-action@v1
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/service_deploy-static-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
workflow_call:
inputs:
environment-name:
required: true
type: string

jobs:
deploy-static-site:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
environment:
name: ${{ inputs.environment-name }}
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: './docs/.nvmrc'

- name: Set env file
run: |
if [[ -z "$BASE_64_SECRET" ]]; then
echo '🚨🚨🚨 ENV File not set 🚨🚨🚨' 1>&2
exit 1
fi
echo $BASE_64_SECRET | base64 -d > .env
working-directory: ./docs
env:
BASE_64_SECRET: ${{ secrets.ENV_FILE_BASE64 }}

- run: |
yarn install --frozen-lockfile
yarn build
npx nuxi generate
working-directory: ./docs
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: docker-php
directory: docs/.output/public
branch: ${{ github.head_ref || github.ref_name }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
150 changes: 91 additions & 59 deletions .github/workflows/service_docker-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,72 @@
on:
workflow_call:
inputs:
upstream-channel-prefix:
required: true
type: string
default: ''
tag-prefix:
required: true
type: string
default: 'beta-'
php-variation:
required: true
default: 'edge-'
php-versions-file:
type: string
checkout-type:
required: true
default: 'scripts/conf/php-versions.yml'
default-image-variation:
type: string
default: 'cli'

jobs:
setup-matrix:
runs-on: ubuntu-22.04
outputs:
php-version-map-json: ${{ steps.get-php-versions.outputs.php-version-map-json }}
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Prepare PHP versions for the matrix. 😎
run: |
chmod +x ./scripts/get-php-versions.sh
./scripts/get-php-versions.sh
- name: Ensure our PHP Versions file exists.
run: |
if [ ! -f "${{ inputs.php-versions-file }}" ]; then
echo "PHP Versions file does not exist. Exiting."
exit 1
else
cat ${{ inputs.php-versions-file }}
fi
- name: Assemble PHP versions into the matrix. 😎
id: get-php-versions
run: |
MATRIX_JSON=$(yq -o=json scripts/conf/php-versions.yml | jq -c '{include: [(.php_variations[] | {name, supported_os: (.supported_os // ["alpine", "bullseye", "bookworm"])} ) as $variation | .php_versions[] | .minor_versions[] | .patch_versions[] as $patch | .base_os[] as $os | select($variation.supported_os | if length == 0 then . else . | index($os.name) end) | {patch_version: $patch, base_os: $os.name, php_variation: $variation.name}]}')
echo "php-version-map-json=${MATRIX_JSON}" >> $GITHUB_OUTPUT
echo "${MATRIX_JSON}" | jq '.'
- name: Upload the php-versions.yml file
uses: actions/upload-artifact@v3
with:
name: php-versions.yml
path: ${{ inputs.php-versions-file }}

docker-publish:
needs: setup-matrix
runs-on: ubuntu-22.04
strategy:
matrix:
php-version:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
steps:
##
# Checkout branch (for push deployments)
##
- name: Get branch name
if: inputs.checkout-type == 'branch'
id: branch-name
uses: tj-actions/branch-names@v6
matrix: ${{fromJson(needs.setup-matrix.outputs.php-version-map-json)}}

- uses: actions/checkout@v3
if: inputs.checkout-type == 'branch'
steps:
- name: Check out code.
uses: actions/checkout@v4

- name: Download PHP Versions file
uses: actions/download-artifact@v3
with:
ref: ${{ steps.branch-name.outputs.current_branch }}
name: php-versions.yml
path: ./artifacts

- name: Move PHP Versions file
run: mv ./artifacts/php-versions.yml ${{ inputs.php-versions-file }}

##
# Checkout latest stable release (for production releases)
##
- name: Get latest stable release
if: inputs.checkout-type == 'latest-stable'
id: latest-stable-version
run: |
echo "LATEST_STABLE_VERSION=$(curl --silent --header "Accept: application/vnd.github.v3.sha" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" >> $GITHUB_OUTPUT
- name: Confirm release tag
if: inputs.checkout-type == 'latest-stable'
run: |
echo "Latest Stable Release Tag: ${{ steps.latest-stable-version.outputs.LATEST_STABLE_VERSION }}"
- name: Checkout latest stable tag
if: inputs.checkout-type == 'latest-stable'
uses: actions/checkout@v3
with:
ref: ${{ steps.latest-stable-version.outputs.LATEST_STABLE_VERSION }}

##
# Docker build & publish
##
Expand All @@ -69,27 +76,52 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: "👨‍🔬 Set docker tags: Non-Release "
if: inputs.checkout-type == 'branch'
run: echo "DOCKER_TAGS=serversideup/php:${{ inputs.tag-prefix}}${{ matrix.php-version }}-${{ inputs.php-variation }}" >> $GITHUB_ENV
uses: docker/setup-buildx-action@v3

- name: "🚀 Set docker tags: Release"
if: inputs.checkout-type == 'latest-stable'
run: echo "DOCKER_TAGS=serversideup/php:${{ inputs.tag-prefix}}${{ matrix.php-version }}-${{ inputs.php-variation }}, serversideup/php:${{ inputs.tag-prefix}}${{ matrix.php-version }}-${{ inputs.php-variation }}-${{ steps.latest-stable-version.outputs.LATEST_STABLE_VERSION }}" >> $GITHUB_ENV
- name: "📦 Assemble the Docker Tags"
run: |
chmod +x ./scripts/assemble-docker-tags.sh
./scripts/assemble-docker-tags.sh
env:
PHP_VERSIONS_FILE: "${{ inputs.php-versions-file }}"
DEFAULT_IMAGE_VARIATION: ${{ inputs.default-image-variation }}
PHP_BUILD_VERSION: ${{ matrix.patch_version }}
PHP_BUILD_VARIATION: ${{ matrix.php_variation }}
PHP_BUILD_BASE_OS: ${{ matrix.base_os }}
DOCKER_TAG_PREFIX: ${{ inputs.tag-prefix }}

- name: Set REPOSITORY_BUILD_VERSION
id: set_version
run: |
if [ "${{ github.ref_type }}" == "tag" ]; then
echo "🚀 Setting REPOSITORY_BUILD_VERSION to Tag"
echo "REPOSITORY_BUILD_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "👨‍🔬 Setting REPOSITORY_BUILD_VERSION to GIT Short SHA and GitHub Run ID"
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)
echo "REPOSITORY_BUILD_VERSION=git-${SHORT_SHA}-${{ github.run_id }}" >> $GITHUB_ENV
fi
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
file: src/variations/${{ matrix.php_variation }}/Dockerfile
build-args: |
UPSTREAM_CHANNEL=${{ inputs.upstream-channel-prefix }}
PHP_VERSION=${{ matrix.php-version }}
context: src/${{ inputs.php-variation }}/.
BASE_OS_VERSION=${{ matrix.base_os }}
PHP_VERSION=${{ matrix.patch_version }}
PHP_VARIATION=${{ matrix.php_variation }}
REPOSITORY_BUILD_VERSION=${{ env.REPOSITORY_BUILD_VERSION }}
platforms: |
linux/amd64
linux/arm/v7
Expand Down
Loading

0 comments on commit 20ecec1

Please sign in to comment.