fix #1603 add FESS_APP_TYPE
This commit is contained in:
parent
575c9aceff
commit
7ca78e8cb4
1 changed files with 11 additions and 0 deletions
|
@ -31,6 +31,10 @@ import org.codelibs.fess.mylasta.direction.FessConfig;
|
|||
import org.lastaflute.web.util.LaServletContextUtil;
|
||||
|
||||
public class ResourceUtil {
|
||||
private static final String FESS_APP_TYPE = "FESS_APP_TYPE";
|
||||
|
||||
private static final String FESS_APP_DOCKER = "docker";
|
||||
|
||||
protected ResourceUtil() {
|
||||
// nothing
|
||||
}
|
||||
|
@ -45,6 +49,13 @@ public class ResourceUtil {
|
|||
}
|
||||
|
||||
public static Path getConfPath(final String... names) {
|
||||
final String fessAppType = System.getenv(FESS_APP_TYPE);
|
||||
if (FESS_APP_DOCKER.equalsIgnoreCase(fessAppType)) {
|
||||
final Path confPath = Paths.get("/opt/fess", names);
|
||||
if (Files.exists(confPath)) {
|
||||
return confPath;
|
||||
}
|
||||
}
|
||||
final String confPath = System.getProperty(Constants.FESS_CONF_PATH);
|
||||
if (StringUtil.isNotBlank(confPath)) {
|
||||
return Paths.get(confPath, names);
|
||||
|
|
Loading…
Add table
Reference in a new issue