etherpad
This commit is contained in:
@@ -1,7 +1,26 @@
|
||||
{ config, containerCfg, pkgs, lib, builder, name,... }:
|
||||
let
|
||||
version = "latest";
|
||||
serverCfg = config.syscfg.server;
|
||||
serverCfg = config.syscfg.server;
|
||||
image = pkgs.dockerTools.streamLayeredImage {
|
||||
name = "etherpad";
|
||||
tag = pkgs.etherpad-lite.version;
|
||||
contents = with pkgs;[ etherpad-lite bash coreutils cacert curl ];
|
||||
fakeRootCommands = ''
|
||||
mkdir -p ./var/lib/etherpad
|
||||
chown -R 5001:5001 ./var/lib/etherpad
|
||||
'';
|
||||
config = {
|
||||
Cmd = [ "${pkgs.etherpad-lite}/bin/etherpad-lite" ];
|
||||
User = "${toString uid}:${toString gid}";
|
||||
WorkingDir = "/var/lib/etherpad";
|
||||
ExposedPorts = { "${toString containerCfg.port}/tcp" = {}; };
|
||||
Env = [
|
||||
"NODE_ENV=production"
|
||||
"HOME=/var/lib/etherpad"
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
in {
|
||||
paths = [{
|
||||
path="${serverCfg.configPath}/etherpad/data";
|
||||
@@ -17,7 +36,7 @@ in {
|
||||
containers = {
|
||||
server = builder.mkContainer {
|
||||
subdomain = containerCfg.subdomain;
|
||||
image = "ghcr.io/ether/etherpad:develop:${version}";
|
||||
imageStream = image;
|
||||
port = containerCfg.port;
|
||||
ip = containerCfg.ip;
|
||||
secret = name;
|
||||
|
||||
Reference in New Issue
Block a user