Nextcloud with custom entrypoint to executes occ commands based on environment variables
100K+
Based on nextcloud:stable-fpm-alpine with custom entrypoint script.
Dockerfile and build script: https://codeberg.org/privacy1st/ContainerImages
On startup the system environment is filtered by keys starting with php_occ_
and their values are executed with php /var/www/html/occ ${value}.
Additionally, the PHP FPM configuration is slightly changed to allow more children:
[www]
pm = dynamic
pm.max_children = 128
pm.start_servers = 8
pm.min_spare_servers = 8
pm.max_spare_servers = 16
The following is an incomplete docker-compose.yml file to demonstrate usage:
services:
nextcloud_app:
container_name: nextcloud_app
image: p1st/nextcloud:stable-fpm-alpine
environment:
### occ commands to run startup ###
- php_occ_1=user:setting <admin_username> settings email <admin_email_address>
- php_occ_2=db:add-missing-columns
- php_occ_3=db:add-missing-indices
- php_occ_4=db:add-missing-primary-keys
- php_occ_5=files:cleanup
- php_occ_6=sharing:cleanup-remote-storages
- php_occ_7=app:update --all
- php_occ_8=config:system:set --type=string --value '/shared' 'share_folder'
Content type
Image
Digest
sha256:63b747e1d…
Size
275.3 MB
Last updated
15 minutes ago
docker pull p1st/nextcloud:27-fpm-alpine