[openproject] Adds openproject

This commit is contained in:
2025-04-03 12:28:49 -07:00
parent ac8db1d9fd
commit ead7739e2d
4 changed files with 50 additions and 3 deletions

View File

@@ -9,6 +9,7 @@
./containers/jobhunt.nix
./containers/mariadb.nix
./containers/nextcloud.nix
./containers/openproject.nix
./containers/prometheus.nix
./containers/pocket-id.nix
./containers/public-homepage.nix

View File

@@ -27,10 +27,11 @@ in
homepageOpts,
dependsOn ? [],
domain ? havenisms,
ports ? [],
volumes ? [],
environment ? {},
environmentFiles ? [],
public ? false
public ? false,
}:
let routerRule = if public then hostRule hostName domain else localHostRule hostName domain;
in

View File

@@ -0,0 +1,43 @@
{ config, ... }:
let
inherit (import ./lib.nix config) mkContainer havenisms;
hostName = "projects";
in {
sops.secrets = {
"openproject/secret-key-base" = {
restartUnits = [ "podman-openproject.service" ];
mode = "0400";
owner = config.users.users.bookstack.name;
};
};
sops.templates."openproject.env" = {
restartUnits = [ "podman-openproject.service" ];
content = ''
OPENPROJECT_SECRET_KEY_BASE=${config.sops.placeholder."openproject/secret-key-base"}
OPENPROJECT_HOST__NAME=${hostName}.${havenisms}
OPENPROJECT_HTTPS=false
OPENPROJECT_DEFAULT__LANGUAGE=en
'';
};
virtualisation.oci-containers.containers.openproject = mkContainer {
inherit hostName;
# Note: this is the all-in-one container that has it's own database.
# Consider switching to the `-slim` version and configuring your own
# database.
image = "openproject/openproject:15";
domain = havenisms;
port = 80;
homepageOpts = {
group = "Apps";
name = "OpenProject";
icon = "openproject.svg";
description = "Project Management";
};
environmentFiles = [
config.sops.templates."openproject.env".path
];
};
}