Merge pull request #156731 from Ma27/bump-plausible
plausible: 1.4.0 -> 1.4.3
This commit is contained in:
commit
13f5c4c45b
|
@ -10,8 +10,7 @@ in {
|
||||||
enable = mkEnableOption "plausible";
|
enable = mkEnableOption "plausible";
|
||||||
|
|
||||||
releaseCookiePath = mkOption {
|
releaseCookiePath = mkOption {
|
||||||
default = null;
|
type = with types; either str path;
|
||||||
type = with types; nullOr (either str path);
|
|
||||||
description = ''
|
description = ''
|
||||||
The path to the file with release cookie. (used for remote connection to the running node).
|
The path to the file with release cookie. (used for remote connection to the running node).
|
||||||
'';
|
'';
|
||||||
|
@ -235,6 +234,8 @@ in {
|
||||||
script = ''
|
script = ''
|
||||||
export CONFIG_DIR=$CREDENTIALS_DIRECTORY
|
export CONFIG_DIR=$CREDENTIALS_DIRECTORY
|
||||||
|
|
||||||
|
export RELEASE_COOKIE="$(< $CREDENTIALS_DIRECTORY/RELEASE_COOKIE )"
|
||||||
|
|
||||||
# setup
|
# setup
|
||||||
${pkgs.plausible}/createdb.sh
|
${pkgs.plausible}/createdb.sh
|
||||||
${pkgs.plausible}/migrate.sh
|
${pkgs.plausible}/migrate.sh
|
||||||
|
@ -243,10 +244,8 @@ in {
|
||||||
psql -d plausible <<< "UPDATE users SET email_verified=true;"
|
psql -d plausible <<< "UPDATE users SET email_verified=true;"
|
||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
${optionalString (cfg.releaseCookiePath != null) ''
|
|
||||||
export RELEASE_COOKIE="$(< $CREDENTIALS_DIRECTORY/RELEASE_COOKIE )"
|
exec plausible start
|
||||||
''}
|
|
||||||
plausible start
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
@ -257,8 +256,8 @@ in {
|
||||||
LoadCredential = [
|
LoadCredential = [
|
||||||
"ADMIN_USER_PWD:${cfg.adminUser.passwordFile}"
|
"ADMIN_USER_PWD:${cfg.adminUser.passwordFile}"
|
||||||
"SECRET_KEY_BASE:${cfg.server.secretKeybaseFile}"
|
"SECRET_KEY_BASE:${cfg.server.secretKeybaseFile}"
|
||||||
] ++ lib.optionals (cfg.mail.smtp.passwordFile != null) [ "SMTP_USER_PWD:${cfg.mail.smtp.passwordFile}"]
|
"RELEASE_COOKIE:${cfg.releaseCookiePath}"
|
||||||
++ lib.optionals (cfg.releaseCookiePath != null) [ "RELEASE_COOKIE:${cfg.releaseCookiePath}"];
|
] ++ lib.optionals (cfg.mail.smtp.passwordFile != null) [ "SMTP_USER_PWD:${cfg.mail.smtp.passwordFile}"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
virtualisation.memorySize = 4096;
|
virtualisation.memorySize = 4096;
|
||||||
services.plausible = {
|
services.plausible = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
releaseCookiePath = "${pkgs.runCommand "cookie" { } ''
|
||||||
|
${pkgs.openssl}/bin/openssl rand -base64 64 >"$out"
|
||||||
|
''}";
|
||||||
adminUser = {
|
adminUser = {
|
||||||
email = "admin@example.org";
|
email = "admin@example.org";
|
||||||
passwordFile = "${pkgs.writeText "pwd" "foobar"}";
|
passwordFile = "${pkgs.writeText "pwd" "foobar"}";
|
||||||
|
|
|
@ -12,13 +12,13 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "plausible";
|
pname = "plausible";
|
||||||
version = "1.4.0";
|
version = "1.4.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "plausible";
|
owner = "plausible";
|
||||||
repo = "analytics";
|
repo = "analytics";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1d31y7mwvml17w97dm5c4312n0ciq39kf4hz3g80hdzbbn72mi4q";
|
sha256 = "1aa5nkwb4qz599zb77dhwrvn5gwcdiyji4vbxmayn2zhv2vhj36d";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO consider using `mix2nix` as soon as it supports git dependencies.
|
# TODO consider using `mix2nix` as soon as it supports git dependencies.
|
||||||
|
|
|
@ -64,5 +64,5 @@
|
||||||
"webpack-bundle-analyzer": "^4.4.2"
|
"webpack-bundle-analyzer": "^4.4.2"
|
||||||
},
|
},
|
||||||
"name": "plausible",
|
"name": "plausible",
|
||||||
"version": "v1.4.0"
|
"version": "v1.4.3"
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue