-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
For local development you'd like to have flexibility in the backend to get the data from a different storage. (zeo, a directory with file/blobstorage, relstorage).
The default instance.yaml checked into git is for production. In #151 there is a discussion to enable extra choices in the cooieplone setup, but the root cause IMHO is that you'd like to have a flexible developer local override that doesn't get into deployment. And have the instance.yaml for staging/production deployment.
If we update the cookieplone backend Makefile with 6 lines to detect an instance-local.yml and put instance-local.yaml in .gitignore, you have that feature.
instance/etc/zope.ini instance/etc/zope.conf: instance.yaml ## Create instance configuration
@echo "$(GREEN)==> Create instance configuration$(RESET)"
## support overriding instance when instance-local.yaml exists
if [[ -s instance-local.yaml ]]; then \
echo ">>> Using instance-local.yaml"; \
uvx cookiecutter -f --no-input -c 2.1.1 --config-file instance-local.yaml gh:plone/cookiecutter-zope-instance; \
else \
uvx cookiecutter -f --no-input -c 2.1.1 --config-file instance.yaml gh:plone/cookiecutter-zope-instance; \
fi
I always put this in my instance-local.yaml, because I want to be able to do a make clean/make install in my backend without loosing the local filestorage/blobstorage. I store my dev-data in PROJECT_ROOT/data instead.
db_storage: direct
db_filestorage_location: ../data/filestorage/Data.fs
db_blobs_location: ../data/blobstorage