Fix api
This commit is contained in:
@@ -71,15 +71,17 @@ let
|
|||||||
tag = etherpad_exe.version;
|
tag = etherpad_exe.version;
|
||||||
contents = with pkgs;[cacert tzdata bash coreutils curl settings ];
|
contents = with pkgs;[cacert tzdata bash coreutils curl settings ];
|
||||||
fakeRootCommands = ''
|
fakeRootCommands = ''
|
||||||
mkdir -p ./opt
|
mkdir -p ./opt ./tmp
|
||||||
chmod 1777 ./opt
|
chmod 1777 ./opt ./tmp
|
||||||
mkdir -p ./tmp
|
|
||||||
chmod 1777 ./tmp
|
|
||||||
'';
|
'';
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${etherpad_exe}/bin/etherpad-lite" "--settings" "/etc/etherpad/settings.json" ];
|
Cmd = [
|
||||||
|
"${pkgs.bash}/bin/bash"
|
||||||
|
"-c"
|
||||||
|
"echo \"$APIKEY\" > /opt/APIKEY.txt && exec ${etherpad_exe}/bin/etherpad-lite --settings /etc/etherpad/settings.json"
|
||||||
|
];
|
||||||
User = "1000:1000";
|
User = "1000:1000";
|
||||||
WorkingDir = "/var/lib/etherpad";
|
WorkingDir = "/opt";
|
||||||
ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; };
|
ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; };
|
||||||
Env = [
|
Env = [
|
||||||
"NODE_ENV=production"
|
"NODE_ENV=production"
|
||||||
@@ -117,14 +119,4 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
setup = {
|
|
||||||
trigger = "server";
|
|
||||||
script = pkgs.writeShellScript "setup" ''
|
|
||||||
SH="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."ETHERPAD".path} etherpad-server sh -c"
|
|
||||||
|
|
||||||
$SH "echo \$APIKEY > /opt/APIKEY.txt"
|
|
||||||
$SH "chmod 0444 /opt/APIKEY.txt"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user