Make instanceName configurable, simplify conventions
This commit is contained in:
parent
e4f11dc831
commit
51d62ed268
|
@ -1,17 +1,15 @@
|
|||
{supervisordConstructorFun, stdenv, dysnomia, stateDir}:
|
||||
{instanceSuffix ? "", inetHTTPServerPort ? 9001, postInstall ? "", type}:
|
||||
{instanceSuffix ? "", instanceName ? "supervisord${instanceSuffix}", containerName ? "supervisord-program${instanceSuffix}", inetHTTPServerPort ? 9001, postInstall ? "", type}:
|
||||
|
||||
let
|
||||
instanceName = "supervisord${instanceSuffix}";
|
||||
|
||||
supervisordTargetDir = "${stateDir}/lib/${instanceName}/conf.d";
|
||||
|
||||
pkg = supervisordConstructorFun {
|
||||
inherit instanceSuffix inetHTTPServerPort;
|
||||
inherit instanceName inetHTTPServerPort;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for Supervisord
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/supervisord-program${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
supervisordTargetDir="${supervisordTargetDir}"
|
||||
EOF
|
||||
|
||||
|
@ -22,7 +20,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
name = "supervisord${instanceSuffix}";
|
||||
name = instanceName;
|
||||
inherit pkg type supervisordTargetDir;
|
||||
providesContainer = "supervisord-program";
|
||||
providesContainer = containerName;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{mysqlConstructorFun, dysnomia, runtimeDir}:
|
||||
{port ? 3306, instanceSuffix ? "", type}:
|
||||
{port ? 3306, instanceSuffix ? "", instanceName ? "mysql${instanceSuffix}", containerName ? "mysql-database${instanceSuffix}", type}:
|
||||
|
||||
let
|
||||
mysqlSocket = "${runtimeDir}/mysqld${instanceSuffix}/mysqld${instanceSuffix}.sock";
|
||||
mysqlSocket = "${runtimeDir}/${instanceName}/${instanceName}.sock";
|
||||
|
||||
mysqlUsername = "root";
|
||||
|
||||
pkg = mysqlConstructorFun {
|
||||
inherit port instanceSuffix;
|
||||
inherit port instanceName;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for MySQL database
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/mysql-database${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
mysqlPort=${toString port}
|
||||
mysqlUsername="${mysqlUsername}"
|
||||
mysqlPassword=
|
||||
|
@ -25,10 +25,10 @@ let
|
|||
};
|
||||
in
|
||||
rec {
|
||||
name = "mysql${instanceSuffix}";
|
||||
name = instanceName;
|
||||
mysqlPort = port;
|
||||
|
||||
inherit pkg type mysqlSocket mysqlUsername;
|
||||
|
||||
providesContainer = "mysql-database${instanceSuffix}";
|
||||
providesContainer = containerName;
|
||||
}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{tomcatConstructorFun, dysnomia, stateDir}:
|
||||
{instanceSuffix ? "", serverPort ? 8005, httpPort ? 8080, httpsPort ? 8443, ajpPort ? 8009, commonLibs ? [], type}:
|
||||
{instanceSuffix ? "", instanceName ? "tomcat${instanceSuffix}", containerName ? "tomcat-webapplication${instanceSuffix}", serverPort ? 8005, httpPort ? 8080, httpsPort ? 8443, ajpPort ? 8009, commonLibs ? [], type}:
|
||||
|
||||
let
|
||||
catalinaBaseDir = "${stateDir}/tomcat${instanceSuffix}";
|
||||
catalinaBaseDir = "${stateDir}/${instanceName}";
|
||||
|
||||
pkg = tomcatConstructorFun {
|
||||
inherit instanceSuffix serverPort httpPort httpsPort ajpPort commonLibs;
|
||||
inherit instanceName serverPort httpPort httpsPort ajpPort commonLibs;
|
||||
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for a Tomcat web application
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/tomcat-webapplication${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
tomcatPort=${toString httpPort}
|
||||
catalinaBaseDir=${catalinaBaseDir}
|
||||
EOF
|
||||
|
@ -22,10 +22,10 @@ let
|
|||
};
|
||||
in
|
||||
rec {
|
||||
name = "simpleAppservingTomcat${instanceSuffix}";
|
||||
name = instanceName;
|
||||
|
||||
inherit pkg type catalinaBaseDir;
|
||||
tomcatPort = httpPort;
|
||||
|
||||
providesContainer = "tomcat-webapplication${instanceSuffix}";
|
||||
providesContainer = containerName;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{apacheConstructorFun, dysnomia, forceDisableUserChange}:
|
||||
{instanceSuffix ? "", port ? 80, modules ? [], serverName ? "localhost", serverAdmin, documentRoot ? ./webapp, extraConfig ? "", enableCGI ? false, enablePHP ? false, filesetOwner ? null, type}:
|
||||
{instanceSuffix ? "", instanceName ? "apache${instanceSuffix}", containerName ? "apache-webapplication${instanceSuffix}", port ? 80, modules ? [], serverName ? "localhost", serverAdmin, documentRoot ? ./webapp, extraConfig ? "", enableCGI ? false, enablePHP ? false, filesetOwner ? null, type}:
|
||||
|
||||
let
|
||||
pkg = apacheConstructorFun {
|
||||
inherit instanceSuffix port modules serverName serverAdmin documentRoot extraConfig enableCGI enablePHP;
|
||||
inherit instanceName port modules serverName serverAdmin documentRoot extraConfig enableCGI enablePHP;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for the Apache HTTP server
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/apache-webapplication${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
httpPort=${toString port}
|
||||
documentRoot=${documentRoot}
|
||||
EOF
|
||||
|
@ -19,9 +19,9 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
name = "simpleWebappApache${instanceSuffix}";
|
||||
name = instanceName;
|
||||
inherit pkg type port documentRoot;
|
||||
providesContainer = "apache-webapplication";
|
||||
providesContainer = containerName;
|
||||
} // (if forceDisableUserChange || filesetOwner == null then {} else {
|
||||
inherit filesetOwner;
|
||||
})
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{influxdbConstructorFun, dysnomia}:
|
||||
{instanceSuffix ? "", rpcBindIP ? "127.0.0.1", rpcPort ? 8088, httpBindIP ? "", httpPort ? 8086, extraConfig ? "", type}:
|
||||
{instanceSuffix ? "", instanceName ? "influxdb${instanceSuffix}", containerName ? "influx-database${instanceSuffix}", rpcBindIP ? "127.0.0.1", rpcPort ? 8088, httpBindIP ? "", httpPort ? 8086, extraConfig ? "", type}:
|
||||
|
||||
let
|
||||
pkg = influxdbConstructorFun {
|
||||
inherit instanceSuffix rpcBindIP rpcPort httpBindIP httpPort extraConfig;
|
||||
inherit instanceName rpcBindIP rpcPort httpBindIP httpPort extraConfig;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for InfluxDB
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/influx-database${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
httpPort=${toString httpPort}
|
||||
EOF
|
||||
|
||||
|
@ -18,7 +18,7 @@ let
|
|||
};
|
||||
in
|
||||
rec {
|
||||
name = "influxdb${instanceSuffix}";
|
||||
name = instanceName;
|
||||
inherit pkg type httpPort;
|
||||
providesContainer = "influx-database${instanceSuffix}";
|
||||
providesContainer = containerName;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{mongodbConstructorFun, stdenv, dysnomia}:
|
||||
{instanceSuffix ? "", bindIP ? "127.0.0.1", port ? 27017, mongoDumpArgs ? null, mongoRestoreArgs ? null, type}:
|
||||
{instanceSuffix ? "", instanceName ? "mongodb${instanceSuffix}", containerName ? "mongo-database${instanceSuffix}", bindIP ? "127.0.0.1", port ? 27017, mongoDumpArgs ? null, mongoRestoreArgs ? null, type}:
|
||||
|
||||
let
|
||||
pkg = mongodbConstructorFun {
|
||||
inherit instanceSuffix bindIP port;
|
||||
inherit instanceName bindIP port;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for MongoDB
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/mongo-database${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
${stdenv.lib.optionalString (mongoDumpArgs != null) (toString mongoDumpArgs)}"}
|
||||
${stdenv.lib.optionalString (mongoRestoreArgs != null) (toString mongoRestoreArgs)}"}
|
||||
EOF
|
||||
|
@ -19,10 +19,10 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
name = "mongodb${instanceSuffix}";
|
||||
name = instanceName;
|
||||
inherit pkg type bindIP port;
|
||||
|
||||
providesContainer = "mongo-database";
|
||||
providesContainer = containerName;
|
||||
} // (if mongoDumpArgs == null then {} else {
|
||||
inherit mongoDumpArgs;
|
||||
}) // (if mongoRestoreArgs == null then {} else {
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
{svnserveConstructorFun, dysnomia}:
|
||||
{instanceSuffix ? "", port ? 3690, svnBaseDir, svnGroup ? "root", type}:
|
||||
{instanceSuffix ? "", instanceName ? "svnserve${instanceSuffix}", containerName ? "subversion-repository${instanceSuffix}", port ? 3690, svnBaseDir, svnGroup ? "root", type}:
|
||||
|
||||
let
|
||||
instanceName = "svnserve${instanceSuffix}";
|
||||
|
||||
pkg = svnserveConstructorFun {
|
||||
inherit instanceSuffix port svnBaseDir svnGroup;
|
||||
inherit instanceName port svnBaseDir svnGroup;
|
||||
postInstall = ''
|
||||
# Add Dysnomia container configuration file for Subversion repositories
|
||||
mkdir -p $out/etc/dysnomia/containers
|
||||
cat > $out/etc/dysnomia/containers/subversion-repository${instanceSuffix} <<EOF
|
||||
cat > $out/etc/dysnomia/containers/${containerName} <<EOF
|
||||
svnGroup=${svnGroup}
|
||||
svnBaseDir=${svnBaseDir}
|
||||
EOF
|
||||
|
@ -23,5 +21,5 @@ in
|
|||
{
|
||||
name = instanceName;
|
||||
inherit pkg type svnGroup svnBaseDir;
|
||||
providesContainer = "subversion-repository";
|
||||
providesContainer = containerName;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, apacheHttpd, cacheDir}:
|
||||
{instanceSuffix ? "", configFile, initialize ? "", postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "httpd${instanceSuffix}", configFile, initialize ? "", postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "httpd${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
in
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
{createManagedProcess, writeTextFile, supervisor, runtimeDir, logDir, stateDir}:
|
||||
{instanceSuffix ? "", inetHTTPServerPort ? 9001, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "supervisord${instanceSuffix}", inetHTTPServerPort ? 9001, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "supervisord${instanceSuffix}";
|
||||
includeDir = "${stateDir}/lib/${instanceName}/conf.d";
|
||||
in
|
||||
import ./supervisord.nix {
|
||||
inherit createManagedProcess supervisor logDir runtimeDir;
|
||||
} {
|
||||
inherit instanceSuffix postInstall;
|
||||
inherit instanceName postInstall;
|
||||
|
||||
initialize = ''
|
||||
mkdir -p ${includeDir}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, influxdb}:
|
||||
{instanceSuffix ? "", configFile, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "influxdb${instanceSuffix}", configFile, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "influxdb${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
in
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, mongodb, runtimeDir}:
|
||||
{instanceSuffix ? "", configFile, initialize ? "", postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "mongodb${instanceSuffix}", configFile, initialize ? "", postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "mongodb${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
in
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, mysql, stateDir, runtimeDir, forceDisableUserChange}:
|
||||
{port ? 3306, instanceSuffix ? "", postInstall ? ""}:
|
||||
{port ? 3306, instanceSuffix ? "", instanceName ? "mysqld${instanceSuffix}", postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "mysqld${instanceSuffix}";
|
||||
dataDir = "${stateDir}/db/${instanceName}";
|
||||
instanceRuntimeDir = "${runtimeDir}/${instanceName}";
|
||||
user = instanceName;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createManagedProcess, stdenv, writeTextFile, nginx, runtimeDir, stateDir, cacheDir, forceDisableUserChange}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? ""}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? "", instanceName ? "nginx${instanceSuffix}"}:
|
||||
interDependencies:
|
||||
|
||||
let
|
||||
instanceName = "nginx${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
|
@ -13,7 +12,7 @@ in
|
|||
import ./nginx.nix {
|
||||
inherit createManagedProcess stdenv nginx stateDir forceDisableUserChange runtimeDir cacheDir;
|
||||
} {
|
||||
inherit instanceSuffix;
|
||||
inherit instanceName;
|
||||
|
||||
dependencies = map (webapp: webapp.pkg) webapps
|
||||
++ map (interDependency: interDependency.pkgs."${stdenv.system}") (builtins.attrValues interDependencies);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createManagedProcess, stdenv, writeTextFile, nginx, runtimeDir, stateDir, cacheDir, forceDisableUserChange}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? "", enableCache ? false}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? "", instanceName ? "nginx${instanceSuffix}", enableCache ? false}:
|
||||
interDependencies:
|
||||
|
||||
let
|
||||
instanceName = "nginx${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
|
@ -16,7 +15,7 @@ in
|
|||
import ./nginx.nix {
|
||||
inherit createManagedProcess stdenv nginx stateDir forceDisableUserChange runtimeDir cacheDir;
|
||||
} {
|
||||
inherit instanceSuffix;
|
||||
inherit instanceName;
|
||||
|
||||
dependencies = map (webapp: webapp.pkg) webapps
|
||||
++ map (interDependency: interDependency.pkgs."${stdenv.system}") (builtins.attrValues interDependencies);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, nginx, stateDir, runtimeDir, cacheDir, forceDisableUserChange}:
|
||||
{configFile, dependencies ? [], instanceSuffix ? ""}:
|
||||
{configFile, dependencies ? [], instanceSuffix ? "", instanceName ? "nginx${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
instanceName = "nginx${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, postgresql, stateDir, runtimeDir, forceDisableUserChange}:
|
||||
{port ? 5432, instanceSuffix ? ""}:
|
||||
{port ? 5432, instanceSuffix ? "", instanceName ? "postgresql${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
instanceName = "postgresql${instanceSuffix}";
|
||||
dataDir = "${stateDir}/db/${instanceName}/data";
|
||||
socketDir = "${runtimeDir}/${instanceName}";
|
||||
user = instanceName;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{createManagedProcess, stdenv, tomcat, jre, stateDir, runtimeDir, tmpDir, forceDisableUserChange}:
|
||||
{instanceSuffix ? "", serverPort ? 8005, httpPort ? 8080, httpsPort ? 8443, ajpPort ? 8009, commonLibs ? [], postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "tomcat${instanceSuffix}", serverPort ? 8005, httpPort ? 8080, httpsPort ? 8443, ajpPort ? 8009, commonLibs ? [], postInstall ? ""}:
|
||||
|
||||
let
|
||||
tomcatConfigFiles = stdenv.mkDerivation {
|
||||
|
@ -25,5 +25,5 @@ in
|
|||
import ./tomcat.nix {
|
||||
inherit createManagedProcess stdenv tomcat jre stateDir runtimeDir tmpDir forceDisableUserChange commonLibs;
|
||||
} {
|
||||
inherit tomcatConfigFiles instanceSuffix postInstall;
|
||||
inherit tomcatConfigFiles instanceName postInstall;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, apacheHttpd, php, writeTextFile, logDir, runtimeDir, cacheDir, forceDisableUserChange}:
|
||||
{instanceSuffix ? "", port ? 80, modules ? [], serverName ? "localhost", serverAdmin, documentRoot ? ./webapp, enablePHP ? false, enableCGI ? false, extraConfig ? "", postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "httpd${instanceSuffix}", port ? 80, modules ? [], serverName ? "localhost", serverAdmin, documentRoot ? ./webapp, enablePHP ? false, enableCGI ? false, extraConfig ? "", postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "httpd${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
|
@ -37,7 +36,7 @@ in
|
|||
import ./apache.nix {
|
||||
inherit createManagedProcess apacheHttpd cacheDir;
|
||||
} {
|
||||
inherit instanceSuffix postInstall;
|
||||
inherit instanceName postInstall;
|
||||
|
||||
initialize = ''
|
||||
mkdir -m0700 -p ${apacheLogDir}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, influxdb, writeTextFile, stateDir}:
|
||||
{instanceSuffix ? "", rpcBindIP ? "127.0.0.1", rpcPort ? 8088, httpBindIP ? "", httpPort ? 8086, extraConfig ? "", postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "influxdb${instanceSuffix}", rpcBindIP ? "127.0.0.1", rpcPort ? 8088, httpBindIP ? "", httpPort ? 8086, extraConfig ? "", postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "influxdb${instanceSuffix}";
|
||||
influxdbStateDir = "${stateDir}/${instanceName}";
|
||||
|
||||
configFile = writeTextFile {
|
||||
|
@ -28,5 +27,5 @@ in
|
|||
import ./influxdb.nix {
|
||||
inherit createManagedProcess influxdb;
|
||||
} {
|
||||
inherit instanceSuffix configFile postInstall;
|
||||
inherit instanceName configFile postInstall;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, writeTextFile, mongodb, runtimeDir, stateDir, forceDisableUserChange}:
|
||||
{instanceSuffix ? "", bindIP ? "127.0.0.1", port ? 27017, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "mongodb${instanceSuffix}", bindIP ? "127.0.0.1", port ? 27017, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "mongodb${instanceSuffix}";
|
||||
mongodbDir = "${stateDir}/db/${instanceName}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
@ -10,7 +9,7 @@ in
|
|||
import ./mongodb.nix {
|
||||
inherit createManagedProcess mongodb runtimeDir;
|
||||
} {
|
||||
inherit instanceSuffix postInstall;
|
||||
inherit instanceName postInstall;
|
||||
configFile = writeTextFile {
|
||||
name = "mongodb.conf";
|
||||
text = ''
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, supervisor, runtimeDir, logDir}:
|
||||
{instanceSuffix ? "", initialize ? "", configFile, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "supervisord${instanceSuffix}", initialize ? "", configFile, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "supervisord${instanceSuffix}";
|
||||
pidFile = "${runtimeDir}/${instanceName}.pid";
|
||||
logFile = "${logDir}/${instanceName}.log";
|
||||
in
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, subversion, runtimeDir, forceDisableUserChange}:
|
||||
{instanceSuffix ? "", port ? 3690, svnBaseDir, svnGroup, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "svnserve${instanceSuffix}", port ? 3690, svnBaseDir, svnGroup, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "svnserve${instanceSuffix}";
|
||||
pidFile = "${runtimeDir}/${instanceName}.pid";
|
||||
in
|
||||
createManagedProcess {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createManagedProcess, stdenv, tomcat, jre, stateDir, runtimeDir, tmpDir, forceDisableUserChange, commonLibs ? []}:
|
||||
{instanceSuffix ? "", tomcatConfigFiles, postInstall ? ""}:
|
||||
{instanceSuffix ? "", instanceName ? "tomcat${instanceSuffix}", tomcatConfigFiles, postInstall ? ""}:
|
||||
|
||||
let
|
||||
instanceName = "tomcat${instanceSuffix}";
|
||||
baseDir = "${stateDir}/${instanceName}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createManagedProcess, tmpDir}:
|
||||
{port, instanceSuffix ? ""}:
|
||||
{port, instanceSuffix ? "", instanceName ? "webapp${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
webapp = import ../../webapp;
|
||||
instanceName = "webapp${instanceSuffix}";
|
||||
pidFile = "${tmpDir}/${instanceName}.pid";
|
||||
in
|
||||
createManagedProcess {
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createManagedProcess, tmpDir}:
|
||||
{port, instanceSuffix ? ""}:
|
||||
{port, instanceSuffix ? "", instanceName ? "webapp${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
webapp = import ../../webapp;
|
||||
instanceName = "webapp${instanceSuffix}";
|
||||
in
|
||||
createManagedProcess {
|
||||
name = instanceName;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createManagedProcess, tmpDir}:
|
||||
{port, instanceSuffix ? ""}:
|
||||
{port, instanceSuffix ? "", instanceName ? "webapp${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
webapp = import ../../webapp;
|
||||
instanceName = "webapp${instanceSuffix}";
|
||||
in
|
||||
createManagedProcess {
|
||||
name = instanceName;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createSystemVInitScript, stdenv, writeTextFile, nginx, runtimeDir, stateDir, logDir, forceDisableUserChange}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? ""}:
|
||||
{port ? 80, webapps ? [], instanceSuffix ? "", instanceName ? "nginx${instanceSuffix}"}:
|
||||
interDependencies:
|
||||
|
||||
let
|
||||
instanceName = "nginx${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
|
||||
|
@ -14,7 +13,7 @@ import ./nginx.nix {
|
|||
inherit createSystemVInitScript stdenv nginx forceDisableUserChange;
|
||||
stateDir = nginxStateDir;
|
||||
} {
|
||||
inherit instanceSuffix;
|
||||
inherit instanceName;
|
||||
|
||||
dependencies = map (webapp: webapp.pkg) webapps
|
||||
++ map (interDependency: interDependency.pkgs."${stdenv.system}") (builtins.attrValues interDependencies);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
{createSystemVInitScript, stdenv, nginx, stateDir, forceDisableUserChange}:
|
||||
{configFile, dependencies ? [], instanceSuffix ? ""}:
|
||||
{configFile, dependencies ? [], instanceSuffix ? "", instanceName ? "nginx${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
instanceName = "nginx${instanceSuffix}";
|
||||
user = instanceName;
|
||||
group = instanceName;
|
||||
nginxLogDir = "${stateDir}/logs";
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{createSystemVInitScript, tmpDir}:
|
||||
{port, instanceSuffix ? ""}:
|
||||
{port, instanceSuffix ? "", instanceName ? "webapp${instanceSuffix}"}:
|
||||
|
||||
let
|
||||
webapp = import ../../webapp;
|
||||
instanceName = "webapp${instanceSuffix}";
|
||||
in
|
||||
createSystemVInitScript {
|
||||
name = instanceName;
|
||||
|
|
Loading…
Reference in New Issue