This commit is contained in:
soraefir
2026-05-11 02:11:15 +02:00
parent 82b422883e
commit 29478e2aed

View File

@@ -71,21 +71,15 @@ 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 ./tmp mkdir -p ./tmp
chmod 1777 ./opt ./tmp chmod 1777 ./tmp
''; '';
config = { config = {
Cmd = [ Cmd = [ "${etherpad_exe}/bin/etherpad-lite" "--settings /etc/etherpad/settings.json" "--apikey $APIKEY"];
"${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 = "/opt";
ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; }; ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; };
Env = [ Env = [
"NODE_ENV=production" "NODE_ENV=production"
"HOME=/opt"
]; ];
}; };
@@ -107,7 +101,6 @@ in {
DB_HOST = builder.host; DB_HOST = builder.host;
DB_NAME = "etherpad_db"; DB_NAME = "etherpad_db";
DB_USER = "etherpad_user"; DB_USER = "etherpad_user";
HOME = "/opt";
TRUST_PROXY = "true"; TRUST_PROXY = "true";
DB_CHARSET = "utf8mb4"; DB_CHARSET = "utf8mb4";
DEFAULT_PAD_TEXT = ""; DEFAULT_PAD_TEXT = "";