mirror of
https://github.com/nextcloud/docker.git
synced 2025-02-03 01:58:27 +01:00
Add NEXTCLOUD_INIT_HTACCESS
to run occ maintenance:update:htaccess
after init (#1761)
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
parent
c416385b7c
commit
209d65d0b6
2 changed files with 10 additions and 0 deletions
|
@ -141,6 +141,10 @@ If you share your html folder with multiple docker containers, you might want to
|
||||||
|
|
||||||
- `NEXTCLOUD_INIT_LOCK` (not set by default) Set it to true to enable initialization locking. Other containers will wait for the current process to finish updating the html volume to continue.
|
- `NEXTCLOUD_INIT_LOCK` (not set by default) Set it to true to enable initialization locking. Other containers will wait for the current process to finish updating the html volume to continue.
|
||||||
|
|
||||||
|
You might also want to make sure the htaccess is up to date after each container update. Especially on multiple swarm nodes as any discrepancy will make your server unusable.
|
||||||
|
|
||||||
|
- `NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization.
|
||||||
|
|
||||||
If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container, pass in the following parameters:
|
If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container, pass in the following parameters:
|
||||||
|
|
||||||
- `REDIS_HOST` (not set by default) Name of Redis container
|
- `REDIS_HOST` (not set by default) Name of Redis container
|
||||||
|
|
|
@ -217,6 +217,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
||||||
echo "Initializing finished"
|
echo "Initializing finished"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Update htaccess after init if requested
|
||||||
|
if [ -n "${NEXTCLOUD_INIT_HTACCESS+x}" ]; then
|
||||||
|
run_as 'php /var/www/html/occ maintenance:update:htaccess'
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
Loading…
Reference in a new issue