Skip to content

Commit

Permalink
Use S6 Overlay v3.1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsenter committed Aug 29, 2022
1 parent 569fd1c commit 2f13e64
Show file tree
Hide file tree
Showing 26 changed files with 171 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .bin/tidy-docker
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ RUN [ -x "\$(command -v find)" ] && find / \( \\
-or -name "*pip*" -or -name "*__pycache__*" \\
-or -name "*easy_install*" -or -name "*dist-info*" \\
\) ! -path "/sys/*" ! -path "/proc/*" \\
-exec rm -rf {} + || true
| xargs rm -rf || true
################################################################################
# BUILDING OPTIMIZED IMAGE FROM SCRATCH. #####################################
FROM scratch
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/build-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ jobs:
- 22.04
- 20.04
s6_version:
- v3.1.1.2
- v3.1.1.1
- v3.1.1.0
- v3.1.0.1
- v3.1.1.0
- v3.1.1.1
- v3.1.1.2
- v3.1.2.0
env:
DOCKER_BUILDKIT: "1"
steps:
Expand Down Expand Up @@ -301,6 +302,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
env:
DOCKER_BUILDKIT: "1"
steps:
Expand Down Expand Up @@ -424,6 +426,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
variation:
- fpm-apache
- fpm-nginx
Expand Down Expand Up @@ -539,6 +542,7 @@ jobs:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
app:
- cakephp4
- codeigniter4
Expand Down
24 changes: 19 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.3.0 - 2022-08-29

Use [S6 Overlay v3.1.2.0](https://github.com/just-containers/s6-overlay/releases/tag/v3.1.2.0).


## 2.2.0 - 2022-07-01

Use [S6 Overlay v3.1.1.2](https://github.com/just-containers/s6-overlay/releases/tag/v3.1.1.2).
Expand Down Expand Up @@ -163,25 +168,34 @@ Docker images for PHP applications, from CLI to standalone web server.

---

<!-- SPONSOR.md -->

## Community

As an open source project, we'd appreciate any help and contributions!
As an open-source project, we'd appreciate any help and contributions!

[![Become a stargazer](https://img.shields.io/badge/Become-Stargazer-yellow)](https://code.shin.company/php/stargazers) [![Report an issue](https://img.shields.io/badge/New-Discussions-green)](https://code.shin.company/php/discussions/new) [![Join us on Gitter](https://badges.gitter.im/shinsenter/php.svg)](https://gitter.im/shinsenter/php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join us on Discord](https://img.shields.io/discord/962919929307357234?color=blueviolet)](https://discord.com/channels/962919929307357234/962920416559652924)

We follow the standard [github pull request process](https://help.github.com/articles/about-pull-requests). It is appreciated when you [report an issue](https://code.shin.company/php/issues/new/choose) or event [start a discussion](https://code.shin.company/php/discussions/new). We'll try to review your contributions as soon as possible.
We should follow the standard [Github pull request process](https://help.github.com/articles/about-pull-requests). I'll try to review your contributions as soon as possible.


Not ready to contribute code, but see something that needs work? From contributing to source code to improving readability of the documentation, all suggestions are welcome!
It is also appreciated when you [report an issue](https://code.shin.company/php/issues/new/choose) or [open a discussion](https://code.shin.company/php/discussions/new).

Not ready to contribute code, but see something that needs work? From contributing to source code to improving the readability of the documentation, all suggestions are welcome!

> [NEED HELP] Please help me [improve the documentation and examples](https://code.shin.company/php/edit/main/README.md).
* * *

## Support my activities

If you like this repository, please [become a stargazer](https://code.shin.company/php/stargazers) on my Github or join Gitter to follow further updates.

I also love to have your help, please consider buying me a coffee, or sponsoring my works so I can create more helpful stuffs 😉.
I also love to have your help, please consider [buying me a coffee](https://www.paypal.me/shinsenter), or sponsoring my work so I can create more helpful pieces of stuff 😉.

[![Donate via PayPal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter) [![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)

I really appreciate your love and supports.
I appreciate your love and support.

* * *

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ These images are actively maintained.
- [![`shinsenter/php:7.4`](https://img.shields.io/docker/image-size/shinsenter/php/7.4?label=shinsenter%2Fphp%3A7.4)](https://docker.shin.company/php/tags?page=1&name=7.4)
- [![`shinsenter/php:8.0`](https://img.shields.io/docker/image-size/shinsenter/php/8.0?label=shinsenter%2Fphp%3A8.0)](https://docker.shin.company/php/tags?page=1&name=8.0)
- [![`shinsenter/php:8.1`](https://img.shields.io/docker/image-size/shinsenter/php/8.1?label=shinsenter%2Fphp%3A8.1)](https://docker.shin.company/php/tags?page=1&name=8.1)
- [![`shinsenter/php:8.2` (beta)](https://img.shields.io/docker/image-size/shinsenter/php/8.2?label=shinsenter%2Fphp%3A8.2%20%28beta%29)](https://docker.shin.company/php/tags?page=1&name=8.2)

### PHP-CLI

Expand Down
7 changes: 4 additions & 3 deletions S6_VERSIONS
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
v3.1.1.2
v3.1.1.1
v3.1.1.0
v3.1.0.1
v3.1.1.0
v3.1.1.1
v3.1.1.2
v3.1.2.0
19 changes: 14 additions & 5 deletions SPONSOR.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
<!-- SPONSOR.md -->

* * *

## Community

As an open source project, we'd appreciate any help and contributions!
As an open-source project, we'd appreciate any help and contributions!

[![Become a stargazer](https://img.shields.io/badge/Become-Stargazer-yellow)](https://code.shin.company/php/stargazers) [![Report an issue](https://img.shields.io/badge/New-Discussions-green)](https://code.shin.company/php/discussions/new) [![Join us on Gitter](https://badges.gitter.im/shinsenter/php.svg)](https://gitter.im/shinsenter/php?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join us on Discord](https://img.shields.io/discord/962919929307357234?color=blueviolet)](https://discord.com/channels/962919929307357234/962920416559652924)

We follow the standard [github pull request process](https://help.github.com/articles/about-pull-requests). It is appreciated when you [report an issue](https://code.shin.company/php/issues/new/choose) or event [start a discussion](https://code.shin.company/php/discussions/new). We'll try to review your contributions as soon as possible.
We should follow the standard [Github pull request process](https://help.github.com/articles/about-pull-requests). I'll try to review your contributions as soon as possible.


It is also appreciated when you [report an issue](https://code.shin.company/php/issues/new/choose) or [open a discussion](https://code.shin.company/php/discussions/new).

Not ready to contribute code, but see something that needs work? From contributing to source code to improving readability of the documentation, all suggestions are welcome!
Not ready to contribute code, but see something that needs work? From contributing to source code to improving the readability of the documentation, all suggestions are welcome!

> [NEED HELP] Please help me [improve the documentation and examples](https://code.shin.company/php/edit/main/README.md).
* * *

## Support my activities

If you like this repository, please [become a stargazer](https://code.shin.company/php/stargazers) on my Github or join Gitter to follow further updates.

I also love to have your help, please consider buying me a coffee, or sponsoring my works so I can create more helpful stuffs 😉.
I also love to have your help, please consider [buying me a coffee](https://www.paypal.me/shinsenter), or sponsoring my work so I can create more helpful pieces of stuff 😉.

[![Donate via PayPal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter) [![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)

I really appreciate your love and supports.
I appreciate your love and support.

* * *

Expand Down
4 changes: 2 additions & 2 deletions src/base-ubuntu/root/usr/bin/cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[ -x "$(command -v composer)" ] && composer clearcache || true
[ -x "$(command -v npm)" ] && npm cache clean --force || true
[ ! -x "$(command -v vim)" ] && rm -rf /usr/share/vim || true
find /etc/ -type f -name '*-' -or -name '.placeholder' -delete 2>/dev/null
find /var/ -type f -name '*-old' -delete 2>/dev/null
find /etc/ -type f -name '*-' -or -name '.placeholder' | xargs rm -rf 2>/dev/null
find /var/ -type f -name '*-old' | xargs rm -rf 2>/dev/null
find /var/log -type f | xargs -I {} bash -c '>{}' 2>/dev/null
rm -rf \
~/.cache ~/.composer* ~/.git* ~/.gnupg ~/.log ~/.npm* \
Expand Down
1 change: 0 additions & 1 deletion src/php/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ RUN echo "Installing PHP ${PHP_VERSION}" \
&& php -r "copy('${COMPOSER_INSTALLER}', '${COMPOSER_SCRIPT}');" \
&& php $COMPOSER_SCRIPT --install-dir=/usr/bin --filename=composer \
&& chmod +xr /usr/bin/composer \
&& /usr/bin/composer global config --no-plugins allow-plugins.composer/installers true \
\
# cleanup
&& apt-upgrade -uq \
Expand Down
3 changes: 3 additions & 0 deletions src/php/cli/php7.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ json
mbstring
memcached
mysql
mysqli
opcache
pdo
redis
soap
sqlite3
Expand Down
3 changes: 3 additions & 0 deletions src/php/cli/php7.4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ json
mbstring
memcached
mysql
mysqli
opcache
pdo
redis
soap
sqlite3
Expand Down
3 changes: 3 additions & 0 deletions src/php/cli/php8.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ intl
mbstring
memcached
mysql
mysqli
opcache
pdo
redis
soap
sqlite3
Expand Down
3 changes: 3 additions & 0 deletions src/php/cli/php8.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ intl
mbstring
memcached
mysql
mysqli
opcache
pdo
redis
soap
sqlite3
Expand Down
9 changes: 3 additions & 6 deletions src/php/cli/php8.2.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
apcu
bcmath
cli
common
curl
gd
gmp
igbinary
intl
mbstring
memcached
mysql
redis
mysqli
opcache
pdo
soap
sqlite3
tidy
uuid
xml
yaml
zip
3 changes: 3 additions & 0 deletions src/php/cli/php9.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ intl
mbstring
memcached
mysql
mysqli
opcache
pdo
redis
soap
sqlite3
Expand Down
1 change: 0 additions & 1 deletion src/php/cli/root/etc/cont-init.d/200-composer-home
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ if [ "$DIR" != "/composer" ]; then
[ -f "${DIR}/keys.dev.pub" ] || wdo php -r "copy('https://composer.github.io/snapshots.pub','${DIR}/keys.dev.pub');"
[ -f "${DIR}/keys.tags.pub" ] || wdo php -r "copy('https://composer.github.io/releases.pub','${DIR}/keys.tags.pub');"
chmod 0644 $DIR/*.pub 2>/dev/null
composer global config --no-plugins allow-plugins.composer/installers true
fi
13 changes: 11 additions & 2 deletions src/php/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,22 @@ RUN apt-update \
&& apt-upgrade -uq \
&& cleanup

# adds config files
ADD root/ /

# opcache preload
RUN if [ "$(php -r 'echo PHP_VERSION_ID;')" -ge "70400" ]; then \
echo '' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
echo 'php_value[opcache.preload] = ${PHP_OPCACHE_PRELOAD}' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
echo 'php_value[opcache.preload_user] = ${PHP_OPCACHE_PRELOAD_USER}' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
fi

# adds config files
ADD root/ /
# opcache jit
RUN if [ "$(php -r 'echo PHP_VERSION_ID;')" -ge "80000" ]; then \
echo '' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
echo 'php_value[opcache.jit] = ${PHP_OPCACHE_JIT}' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
echo 'php_value[opcache.jit_buffer_size] = ${PHP_OPCACHE_BUFFER_SIZE}' >>/etc/php/fpm/pool.d/x-override-php-defaults.conf; \
fi

# sets the working directory
# WORKDIR $WEBHOME
Expand Down Expand Up @@ -83,5 +90,7 @@ ENV PHP_OPCACHE_REVALIDATE_FREQ=5
ENV PHP_OPCACHE_REVALIDATE_PATH=0
ENV PHP_OPCACHE_SAVE_COMMENTS=1
ENV PHP_OPCACHE_VALIDATE_TIMESTAMPS=1
ENV PHP_OPCACHE_JIT=tracing
ENV PHP_OPCACHE_BUFFER_SIZE=128M

################################################################################
4 changes: 3 additions & 1 deletion src/webapps/fuelphp/root/startup/500-init-fuelphp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FUEL_CHECK="$FUEL_ROOT/fuel/app"
if [ ! -d "$FUEL_CHECK" ]; then
echo; echo "🤖 Installing $FUEL_PROJECT from scratch"
rm -rf $FUEL_ROOT/public $FUEL_ROOT/index.*
composer-create -d $FUEL_ROOT/ $FUEL_PROJECT $FUEL_ROOT/
composer-create -d $FUEL_ROOT/ $FUEL_PROJECT $FUEL_ROOT/ --no-install
composer config -d $FUEL_ROOT/ --no-plugins allow-plugins.composer/installers true
composer-install -d $FUEL_ROOT/
wmd $FUEL_ROOT -R &
fi
5 changes: 3 additions & 2 deletions src/webapps/kirby/root/startup/500-init-kirby
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ KIRBY_CHECK="$KIRBY_ROOT/kirby"
if [ ! -d "$KIRBY_CHECK" ]; then
echo; echo "🤖 Installing $KIRBY_PROJECT from scratch"
rm -rf $KIRBY_ROOT/web $KIRBY_ROOT/index.*
composer global config --no-plugins allow-plugins.getkirby/composer-installer true
composer-create -d $KIRBY_ROOT/ $KIRBY_PROJECT $KIRBY_ROOT/
composer-create -d $KIRBY_ROOT/ $KIRBY_PROJECT $KIRBY_ROOT/ --no-install
composer config -d $KIRBY_ROOT/ --no-plugins allow-plugins.getkirby/composer-installer true
composer-install -d $KIRBY_ROOT/
wmd $KIRBY_ROOT -R &
fi
4 changes: 3 additions & 1 deletion src/webapps/slim/root/startup/500-init-slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ SLIM_CHECK="$SLIM_ROOT/src/Application"
if [ ! -d "$SLIM_CHECK" ]; then
echo; echo "🤖 Installing $SLIM_PROJECT from scratch"
rm -rf $SLIM_ROOT/public $SLIM_ROOT/index.*
composer-create -d $SLIM_ROOT/ $SLIM_PROJECT $SLIM_ROOT/
composer-create -d $SLIM_ROOT/ $SLIM_PROJECT $SLIM_ROOT/ --no-install
composer config -d $SLIM_ROOT/ --no-plugins allow-plugins.phpstan/extension-installer true
composer-install -d $SLIM_ROOT/
wmd $SLIM_ROOT -R &
fi
23 changes: 22 additions & 1 deletion src/webapps/wordpress/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,28 @@ ENV PHP_MAX_EXECUTION_TIME=300
ENV PHP_POST_MAX_SIZE=100M
ENV PHP_UPLOAD_MAX_FILE_SIZE=10M

# set more env variables
# debug mode
ENV WORDPRESS_WP_DEBUG="0"

# default locale
ENV WORDPRESS_LOCALE="en_US"

# DB connection
ENV WORDPRESS_DB_HOST="localhost"
ENV WORDPRESS_DB_USER="username_here"
ENV WORDPRESS_DB_PASSWORD="password_here"
ENV WORDPRESS_DB_NAME="database_name_here"
ENV WORDPRESS_DB_CHARSET="utf8mb4"
ENV WORDPRESS_DB_COLLATE=""

# security keys
ENV WORDPRESS_AUTH_KEY=""
ENV WORDPRESS_SECURE_AUTH_KEY=""
ENV WORDPRESS_LOGGED_IN_KEY=""
ENV WORDPRESS_NONCE_KEY=""
ENV WORDPRESS_AUTH_SALT=""
ENV WORDPRESS_SECURE_AUTH_SALT=""
ENV WORDPRESS_LOGGED_IN_SALT=""
ENV WORDPRESS_NONCE_SALT=""

################################################################################
26 changes: 26 additions & 0 deletions src/webapps/wordpress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,27 @@ ENV WEBHOME="/var/www/html"
# the locale for a fresh Wordpress
ENV WORDPRESS_LOCALE="en_US"

# debug mode
ENV WORDPRESS_WP_DEBUG="0"

# DB connection
ENV WORDPRESS_DB_HOST="localhost"
ENV WORDPRESS_DB_USER="username_here"
ENV WORDPRESS_DB_PASSWORD="password_here"
ENV WORDPRESS_DB_NAME="database_name_here"
ENV WORDPRESS_DB_CHARSET="utf8mb4"
ENV WORDPRESS_DB_COLLATE=""

# security keys
ENV WORDPRESS_AUTH_KEY=""
ENV WORDPRESS_SECURE_AUTH_KEY=""
ENV WORDPRESS_LOGGED_IN_KEY=""
ENV WORDPRESS_NONCE_KEY=""
ENV WORDPRESS_AUTH_SALT=""
ENV WORDPRESS_SECURE_AUTH_SALT=""
ENV WORDPRESS_LOGGED_IN_SALT=""
ENV WORDPRESS_NONCE_SALT=""

# ==========================================================

# recommended settings
Expand Down Expand Up @@ -200,6 +221,11 @@ services:
TZ: UTC
PUID: ${UID:-9999}
PGID: ${GID:-9999}
WORDPRESS_WP_DEBUG: true
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: mydb_p@ssw0rd
WORDPRESS_DB_NAME: my_database
ports:
- "80:80"
- "443:443"
Expand Down
Loading

0 comments on commit 2f13e64

Please sign in to comment.