Compare commits
3 Commits
master
...
project-ma
| Author | SHA1 | Date | |
|---|---|---|---|
| 6001d90daf | |||
| 48bb34847a | |||
| 41a1f8e17e |
@@ -11,6 +11,9 @@
|
||||
./nix-serve.nix
|
||||
./gitlab-runner.nix
|
||||
./gitea.nix
|
||||
./openproject.nix
|
||||
./redmine.nix
|
||||
./vikunja.nix
|
||||
../hut/public-inbox.nix
|
||||
../hut/msmtp.nix
|
||||
../module/p.nix
|
||||
|
||||
@@ -52,6 +52,16 @@ in
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
proxy_redirect http:// $scheme://;
|
||||
}
|
||||
location /op {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_pass_header Server;
|
||||
proxy_redirect off;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
proxy_pass_request_headers on;
|
||||
}
|
||||
location /grafana {
|
||||
proxy_pass http://127.0.0.1:2342;
|
||||
proxy_redirect http:// $scheme://;
|
||||
|
||||
51
m/tent/openproject.nix
Normal file
51
m/tent/openproject.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
dataDir = "/var/lib/openproject/assets";
|
||||
in
|
||||
{
|
||||
# TODO: Create a new user and group to run openproject
|
||||
|
||||
# Ensure directory exists
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${dataDir} 777 root root"
|
||||
];
|
||||
|
||||
systemd.services.openproject = let
|
||||
openprojectSrc = pkgs.fetchFromGitHub {
|
||||
owner = "opf";
|
||||
repo = "openproject-docker-compose";
|
||||
rev = "b66694f26020a205fbefd697530fee287d1ddea2"; # branch stable/17
|
||||
sha256 = "sha256-m23vM0NyaTA54sjAHlFJ8mOhOjqp9CAciLx4UxzFfHI=";
|
||||
};
|
||||
envFile = pkgs.writeText ".env" ''
|
||||
# https://www.openproject.org/docs/installation-and-operations/configuration/environment/
|
||||
TAG=17-slim
|
||||
OPENPROJECT_HTTPS=true
|
||||
SECRET_KEY_BASE=OVERWRITE_ME
|
||||
OPENPROJECT_HOST__NAME=jungle.bsc.es
|
||||
PORT=127.0.0.1:8080
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT=/op
|
||||
IMAP_ENABLED=false
|
||||
DATABASE_URL=postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true
|
||||
RAILS_MIN_THREADS=4
|
||||
RAILS_MAX_THREADS=16
|
||||
PGDATA="/var/lib/postgresql/data"
|
||||
OPDATA="${dataDir}"
|
||||
COLLABORATIVE_SERVER_URL=ws://localhost:8080/hocuspocus
|
||||
COLLABORATIVE_SERVER_SECRET=secret12345
|
||||
'';
|
||||
in {
|
||||
# Needs docker-compose package
|
||||
path = with pkgs; [ docker-compose ];
|
||||
script = ''
|
||||
docker-compose \
|
||||
-p openproject \
|
||||
-f ${openprojectSrc}/docker-compose.yml \
|
||||
--env-file ${envFile} \
|
||||
up --build --pull always
|
||||
'';
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "docker.service" "docker.socket" ];
|
||||
};
|
||||
}
|
||||
10
m/tent/redmine.nix
Normal file
10
m/tent/redmine.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.redmine = {
|
||||
enable = true;
|
||||
port = 3003;
|
||||
database.type = "sqlite3";
|
||||
# Redmine::Utils::relative_url_root = "/redmine"
|
||||
};
|
||||
}
|
||||
13
m/tent/vikunja.nix
Normal file
13
m/tent/vikunja.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.vikunja.enable = true;
|
||||
services.vikunja.frontendScheme = "http";
|
||||
services.vikunja.frontendHostname = "localhost";
|
||||
|
||||
# To run vikunja from a subdirectory we need to *sigh* rebuild it with the
|
||||
# variable "VIKUNJA_FRONTEND_BASE" set to the subpath.
|
||||
# See https://vikunja.io/docs/running-vikunja-in-a-subdirectory/
|
||||
# services.vikunja.package = pkgs.vikunja.overrideAttrs (old: {
|
||||
# });
|
||||
#services.nginx.virtualHosts."jungle.bsc.es".locations."/vikunja".extraConfig
|
||||
}
|
||||
Reference in New Issue
Block a user