Docker!
services:
app:
image: my-php-app:latest
ports:
- "8081:8080"
restart: unless-stopped
environment:
# https://serversideup.net/open-source/docker-php/docs/reference/environment-variable-specification
AUTORUN_ENABLED: "true" # Enable or disable all automations. It's advised to set this to false in certain CI environments (especially during a composer install). If this is set to false, all AUTORUN_* behaviors will also be disabled.
PHP_MEMORY_LIMIT: "128M" # Set the maximum amount of memory in bytes that a script is allowed to allocate. (https://www.php.net/manual/en/ini.core.php#ini.memory-limit) DEFAULT 20M
PHP_POST_MAX_SIZE: "20M" # Sets max size of post data allowed. (https://www.php.net/manual/en/ini.core.php#ini.post-max-size) DEFAULT 8M
PHP_UPLOAD_MAX_FILE_SIZE: "10M" # The maximum size of an uploaded file. (https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize) DEFAULT 10M
volumes:
- ./data/.env:/var/www/html/.env:ro
- ./data/storage:/var/www/html/storage:rw