Closed pun-ky closed 4 years ago
workaround found:
disabling volume for cache and creating document roots manually via init script
I suggest using exec before apache2 starts and creating those missing directories directly in the container. So we will keep one way of creating them no matter if bind mount works or nor and we are in sync with directories dsl from environment plugin:
directories {
regular(
"httpd/logs"
)
cache(
"httpd/cache/content/example/live",
"httpd/cache/content/example/demo"
)
}
it would be nice if it will be fixed together with https://github.com/Cognifide/gradle-aem-plugin/issues/448
@mierzwid so that this section could be removed, but then cleaning should be moved to clean { }
target DSL
aem {
environment {
dockerContainers {
"httpd" { // or 'define("httpd")'
up {
exec("mkdir -p /opt/aem/dispatcher/cache/content/example/demo")
exec("mkdir -p /opt/aem/dispatcher/cache/content/example/live")
exec("command for restarting httpd)
}
clean {
exec("rm -fr /opt/aem/dispatcher/cache/content/example/demo/*")
exec("rm -fr /opt/aem/dispatcher/cache/content/example/live/*")
}
}
"knotx" { // or 'define("knotx")'
up {
// exec any init commands needed
}
clean {
exec("sudo service knotx restart") // sth like that
}
}
}
DSL proposal #477
to be released in 8.0.0
when having multiple markets e.g /content/exmaple/en-us ,/content/example/en-gb AEM dispatcher notices an error when creating file in cache then renaming file to target name (swapping cache entry)
the cause of error is volume for cache directory; on Unix based systems it is working correctly. On windows / hyper-v the error might occur: