Skip to content

Commit

Permalink
Add builds back into image and update README.md (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettt89 authored Aug 10, 2020
1 parent 80b8254 commit 9b330e3
Show file tree
Hide file tree
Showing 36 changed files with 1,108 additions and 95 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
paths-ignore:
- 'README.md'
- 'docs/'
- 'LICENCE'
- 'Makefile'
branches:
- master
pull_request:
paths-ignore:
- 'README.md'
- 'docs/'
- 'LICENCE'
- 'Makefile'
branches:
- master
- release/**
Expand Down Expand Up @@ -38,11 +48,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Pull Docker images
run: docker-compose pull

- name: Build Image
run: ./build/build-image.sh ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
- name: Build Images
env:
TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
BUILD_DIR: ${{ matrix.php }}/${{ matrix.distro }}/${{ matrix.os }}
run: docker-compose build

- name: Get Composer Cache Directory
id: composer-data
Expand All @@ -63,11 +73,6 @@ jobs:
COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }}
run: docker-compose run create-project

- name: Install Silverstripe test project
env:
COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }}
run: docker-compose run install-project

- name: Run tests
env:
TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
Expand Down Expand Up @@ -99,11 +104,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Pull Docker images
run: docker-compose pull

- name: Build Image
run: ./build/build-image.sh ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
- name: Build Images
env:
TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
BUILD_DIR: ${{ matrix.php }}/${{ matrix.distro }}/${{ matrix.os }}
run: docker-compose build

- name: Get Composer Cache Directory
id: composer-data
Expand All @@ -124,11 +129,6 @@ jobs:
COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }}
run: docker-compose run create-project

- name: Install Silverstripe test project
env:
COMPOSER_HOME: ${{ steps.composer-data.outputs.dir }}
run: docker-compose run install-project

- name: Run tests
env:
TAG: ${{ matrix.php }}-${{ matrix.distro }}-${{ matrix.os }}
Expand Down
49 changes: 49 additions & 0 deletions 5.6/apache/jessie/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
# Apache configuration
ENV DOCUMENT_ROOT /var/www/html
RUN { \
echo '<VirtualHost *:80>'; \
echo ' DocumentRoot ${DOCUMENT_ROOT}'; \
echo ' LogLevel warn'; \
echo ' ServerSignature Off'; \
echo ' <Directory ${ENVVAR}>'; \
echo ' Options +FollowSymLinks'; \
echo ' Options -ExecCGI -Includes -Indexes'; \
echo ' AllowOverride all'; \
echo; \
echo ' Require all granted'; \
echo ' </Directory>'; \
echo ' <LocationMatch assets/>'; \
echo ' php_flag engine off'; \
echo ' </LocationMatch>'; \
echo; \
echo ' IncludeOptional sites-available/000-default.local*'; \
echo '</VirtualHost>'; \
} | tee /etc/apache2/sites-available/000-default.conf && \
echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \
a2enmod rewrite expires remoteip cgid headers
49 changes: 49 additions & 0 deletions 5.6/apache/stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
# Apache configuration
ENV DOCUMENT_ROOT /var/www/html
RUN { \
echo '<VirtualHost *:80>'; \
echo ' DocumentRoot ${DOCUMENT_ROOT}'; \
echo ' LogLevel warn'; \
echo ' ServerSignature Off'; \
echo ' <Directory ${ENVVAR}>'; \
echo ' Options +FollowSymLinks'; \
echo ' Options -ExecCGI -Includes -Indexes'; \
echo ' AllowOverride all'; \
echo; \
echo ' Require all granted'; \
echo ' </Directory>'; \
echo ' <LocationMatch assets/>'; \
echo ' php_flag engine off'; \
echo ' </LocationMatch>'; \
echo; \
echo ' IncludeOptional sites-available/000-default.local*'; \
echo '</VirtualHost>'; \
} | tee /etc/apache2/sites-available/000-default.conf && \
echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \
a2enmod rewrite expires remoteip cgid headers
26 changes: 26 additions & 0 deletions 5.6/cli/jessie/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
26 changes: 26 additions & 0 deletions 5.6/cli/stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
26 changes: 26 additions & 0 deletions 5.6/fpm/jessie/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
26 changes: 26 additions & 0 deletions 5.6/fpm/stretch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
49 changes: 49 additions & 0 deletions 7.1/apache/buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
# Apache configuration
ENV DOCUMENT_ROOT /var/www/html
RUN { \
echo '<VirtualHost *:80>'; \
echo ' DocumentRoot ${DOCUMENT_ROOT}'; \
echo ' LogLevel warn'; \
echo ' ServerSignature Off'; \
echo ' <Directory ${ENVVAR}>'; \
echo ' Options +FollowSymLinks'; \
echo ' Options -ExecCGI -Includes -Indexes'; \
echo ' AllowOverride all'; \
echo; \
echo ' Require all granted'; \
echo ' </Directory>'; \
echo ' <LocationMatch assets/>'; \
echo ' php_flag engine off'; \
echo ' </LocationMatch>'; \
echo; \
echo ' IncludeOptional sites-available/000-default.local*'; \
echo '</VirtualHost>'; \
} | tee /etc/apache2/sites-available/000-default.conf && \
echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \
a2enmod rewrite expires remoteip cgid headers
49 changes: 49 additions & 0 deletions 7.1/apache/jessie/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
ARG TAG

FROM php:$TAG
MAINTAINER Brett Tasker "<brett@silverstripe.com>"
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/install-php-extensions

# Install default PHP Extensions
RUN install-php-extensions \
bcmath \
mysqli \
pdo \
pdo_mysql \
intl \
ldap \
gd \
soap \
tidy \
xsl \
zip \
exif \
gmp

# Pipe errors to stdErr
RUN echo "date.timezone = Pacific/Auckland" > /usr/local/etc/php/conf.d/timezone.ini && \
echo "log_errors = On\nerror_log = /dev/stderr" > /usr/local/etc/php/conf.d/errors.ini
# Apache configuration
ENV DOCUMENT_ROOT /var/www/html
RUN { \
echo '<VirtualHost *:80>'; \
echo ' DocumentRoot ${DOCUMENT_ROOT}'; \
echo ' LogLevel warn'; \
echo ' ServerSignature Off'; \
echo ' <Directory ${ENVVAR}>'; \
echo ' Options +FollowSymLinks'; \
echo ' Options -ExecCGI -Includes -Indexes'; \
echo ' AllowOverride all'; \
echo; \
echo ' Require all granted'; \
echo ' </Directory>'; \
echo ' <LocationMatch assets/>'; \
echo ' php_flag engine off'; \
echo ' </LocationMatch>'; \
echo; \
echo ' IncludeOptional sites-available/000-default.local*'; \
echo '</VirtualHost>'; \
} | tee /etc/apache2/sites-available/000-default.conf && \
echo "ServerName localhost" > /etc/apache2/conf-available/fqdn.conf && \
a2enmod rewrite expires remoteip cgid headers
Loading

0 comments on commit 9b330e3

Please sign in to comment.