Fix api
This commit is contained in:
@@ -71,15 +71,17 @@ let
|
||||
tag = etherpad_exe.version;
|
||||
contents = with pkgs;[cacert tzdata bash coreutils curl settings ];
|
||||
fakeRootCommands = ''
|
||||
mkdir -p ./opt
|
||||
chmod 1777 ./opt
|
||||
mkdir -p ./tmp
|
||||
chmod 1777 ./tmp
|
||||
mkdir -p ./opt ./tmp
|
||||
chmod 1777 ./opt ./tmp
|
||||
'';
|
||||
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";
|
||||
WorkingDir = "/var/lib/etherpad";
|
||||
WorkingDir = "/opt";
|
||||
ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; };
|
||||
Env = [
|
||||
"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