Fix some clarity issues, make dbus-daemon a dependency of the Disnix-enabled Tomcat service
This commit is contained in:
parent
0d917271ec
commit
a9ec72258b
|
@ -40,7 +40,7 @@ rec {
|
|||
requiresUniqueIdsFor = [ "uids" "gids" ];
|
||||
};
|
||||
|
||||
tomcat-primary = containerProviderConstructors.disnixAppservingTomcat {
|
||||
tomcat-primary = containerProviderConstructors.simpleAppservingTomcat {
|
||||
instanceSuffix = "-primary";
|
||||
httpPort = 8080;
|
||||
httpsPort = 8443;
|
||||
|
@ -53,7 +53,7 @@ rec {
|
|||
properties.requiresUniqueIdsFor = [ "uids" "gids" ];
|
||||
};
|
||||
|
||||
tomcat-secondary = containerProviderConstructors.disnixAppservingTomcat {
|
||||
tomcat-secondary = containerProviderConstructors.simpleAppservingTomcat {
|
||||
instanceSuffix = "-secondary";
|
||||
httpPort = 8081;
|
||||
httpsPort = 8444;
|
||||
|
@ -82,7 +82,6 @@ rec {
|
|||
pkg = constructors.disnix-service {
|
||||
inherit dbus-daemon;
|
||||
containerProviders = [ tomcat-primary tomcat-secondary mysql-primary mysql-secondary ];
|
||||
authorizedUsers = [ tomcat-primary.name tomcat-secondary.name ];
|
||||
};
|
||||
|
||||
requiresUniqueIdsFor = [ "gids" ];
|
||||
|
|
|
@ -46,6 +46,7 @@ rec {
|
|||
pkgs.tomcat9.webapps # Include the Tomcat example and management applications
|
||||
];
|
||||
enableAJP = true;
|
||||
inherit dbus-daemon;
|
||||
|
||||
properties.requiresUniqueIdsFor = [ "uids" "gids" ];
|
||||
};
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
{tomcatConstructorFun, lib, tomcat, libmatthew_java, dbus_java, DisnixWebService, dysnomia, stateDir}:
|
||||
|
||||
args:
|
||||
{dbus-daemon, ...}@args:
|
||||
|
||||
let
|
||||
instanceArgs = removeAttrs args [ "dbus-daemon" ];
|
||||
in
|
||||
import ./simple-appserving-tomcat.nix {
|
||||
inherit tomcatConstructorFun lib tomcat dysnomia stateDir;
|
||||
} (args // {
|
||||
javaOpts = lib.optionalString (args ? javaOpts) "${args.javaOpts} " + "-Djava.library.path=${libmatthew_java}/lib/jni";
|
||||
sharedLibs = args.sharedLibs or [] ++ [
|
||||
} (instanceArgs // {
|
||||
javaOpts = lib.optionalString (instanceArgs ? javaOpts) "${instanceArgs.javaOpts} " + "-Djava.library.path=${libmatthew_java}/lib/jni";
|
||||
sharedLibs = instanceArgs.sharedLibs or [] ++ [
|
||||
"${DisnixWebService}/share/java/DisnixConnection.jar"
|
||||
"${dbus_java}/share/java/dbus.jar"
|
||||
];
|
||||
webapps = args.webapps or [ tomcat.webapps ]
|
||||
++ [ DisnixWebService ];
|
||||
webapps = instanceArgs.webapps or [ tomcat.webapps ] ++ [ DisnixWebService ];
|
||||
dependencies = instanceArgs.dependencies or [] ++ [ dbus-daemon.pkg ];
|
||||
})
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
, webapps ? [ tomcat.webapps ]
|
||||
, enableAJP ? false
|
||||
, type ? null
|
||||
, dependencies ? []
|
||||
, properties ? {}
|
||||
}:
|
||||
|
||||
|
@ -19,7 +20,7 @@ let
|
|||
catalinaBaseDir = "${stateDir}/${instanceName}";
|
||||
|
||||
pkg = tomcatConstructorFun {
|
||||
inherit instanceName serverPort httpPort httpsPort ajpPort javaOpts catalinaOpts commonLibs sharedLibs webapps enableAJP;
|
||||
inherit instanceName serverPort httpPort httpsPort ajpPort javaOpts catalinaOpts commonLibs sharedLibs webapps enableAJP dependencies;
|
||||
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for a Tomcat web application
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
, javaOpts ? ""
|
||||
, catalinaOpts ? ""
|
||||
, commonLibs ? []
|
||||
, dependencies ? []
|
||||
, postInstall ? ""
|
||||
}:
|
||||
|
||||
|
@ -17,7 +18,7 @@ let
|
|||
in
|
||||
createManagedProcess rec {
|
||||
name = instanceName;
|
||||
inherit instanceName user pidFile postInstall;
|
||||
inherit instanceName user pidFile dependencies postInstall;
|
||||
|
||||
process = "${tomcat}/bin/catalina.sh";
|
||||
args = [ "run" ];
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
, sharedLibs ? []
|
||||
, webapps ? [ tomcat.webapps ]
|
||||
, enableAJP ? false
|
||||
, dependencies ? []
|
||||
, postInstall ? ""
|
||||
}:
|
||||
|
||||
|
@ -96,5 +97,5 @@ in
|
|||
import ./default.nix {
|
||||
inherit createManagedProcess lib tomcat jre stateDir runtimeDir tmpDir forceDisableUserChange;
|
||||
} {
|
||||
inherit tomcatConfigFiles instanceName javaOpts catalinaOpts commonLibs postInstall;
|
||||
inherit tomcatConfigFiles instanceName javaOpts catalinaOpts commonLibs dependencies postInstall;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
, processManager
|
||||
, dysnomiaProperties
|
||||
, dysnomiaContainers
|
||||
|
||||
, containerProviders
|
||||
, extraDysnomiaContainersPath
|
||||
, processManagerContainerSettings
|
||||
|
|
Loading…
Reference in New Issue