feat(etna): migrate shlink to camasca package and postgres
This commit is contained in:
parent
c8740ba8a1
commit
10d00e75b2
1 changed files with 23 additions and 7 deletions
|
@ -1,13 +1,29 @@
|
||||||
|
{ camasca, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ camasca.nixosModules.shlink ];
|
||||||
|
|
||||||
cfTunnels."uku.moe" = "http://localhost:8081";
|
cfTunnels."uku.moe" = "http://localhost:8081";
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.shlink = {
|
services = {
|
||||||
image = "shlinkio/shlink:stable";
|
shlink = {
|
||||||
ports = [ "8081:8080" ];
|
enable = true;
|
||||||
volumes = [ "/data/shlink/database.sqlite:/etc/shlink/data/database.sqlite" ];
|
|
||||||
environment = {
|
environment = {
|
||||||
|
PORT = "8081";
|
||||||
DEFAULT_DOMAIN = "uku.moe";
|
DEFAULT_DOMAIN = "uku.moe";
|
||||||
IS_HTTPS_ENABLED = "true";
|
IS_HTTPS_ENABLED = "true";
|
||||||
|
DB_DRIVER = "postgres";
|
||||||
|
DB_UNIX_SOCKET = "/var/run/postgresql";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
postgresql = {
|
||||||
|
ensureDatabases = [ "shlink" ];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "shlink";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue