PHP-FPM based Oberon configured application containers. supervisord, crontabs, pm2, git, hg, node8
1M+
Based on https://hub.docker.com/_/php/
Using:
Changelog:
PHP-FPM based containers, adding PHP extensions that we often use:
Support for locales:
Enabled default PHP extensions:
Used for apps that have no separated front-end (like react), we have added nodejs so these can also be build inside the same container:
version: '3'
services:
web:
image: oberonamsterdam/apache24-fpm
restart: always
network_mode: "bridge"
environment:
- "VIRTUAL_HOST=${DOCKER_VHOST}"
links:
- php
depends_on:
- php
volumes:
- .:/app/:cached
php:
image: oberonamsterdam/php:7.4-fpm
restart: always
network_mode: "bridge"
volumes:
- .:/app/:cached
environment:
- "PHP_SESSION_SAVE_HANDLER=redis"
- "PHP_SESSION_SAVE_PATH=tcp://redis:6379"
links:
- redis
depends_on:
- redis
redis:
image: redis:alpine
restart: always
network_mode: "bridge"
These values can be overwritten in your .env or "environment"-tag in your docker-compose.yml:
PHP_MAX_EXECUTION_TIME=120
PHP_MEMORY_LIMIT=256M
PHP_UPLOAD_LIMIT=8M
PHP_OPCACHE_LIMIT=64M
PHP_OPCACHE_REVALIDATE=2
PHP_SESSION_SAVE_HANDLER=files
PHP_SESSION_SAVE_PATH=""
PHP_SMTP_HOST=localhost
PHP_MAX_INPUT_VARS=1000
For example, you can add a redis container and change the redis-settings in your PHP-container:
version: '3'
services:
php:
image: oberonamsterdam/php:7.4-fpm
network_mode: "bridge"
environment:
- "PHP_SESSION_SAVE_HANDLER=redis"
- "PHP_SESSION_SAVE_PATH=tcp://redis:6379"
links:
- redis
depends_on:
- redis
redis:
image: redis:alpine
network_mode: "bridge"
For development, set PHP_OPCACHE_REVALIDATE to "0", the default value "2" is somewhat of a tradeoff.
Content type
Image
Digest
sha256:94890cbd7…
Size
419.8 MB
Last updated
over 1 year ago
docker pull oberonamsterdam/php:8.2-fpm