mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-07-03 15:57:20 +02:00
It's time
This commit is contained in:
parent
2a03f29b63
commit
29d945137e
1 changed files with 14 additions and 4 deletions
|
@ -2,6 +2,8 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.luj.filerun;
|
cfg = config.luj.filerun;
|
||||||
|
mysql_root_pw = [ (builtins.readFile /run/secrets/filerun-root-passwd) ];
|
||||||
|
mysql_pw = [ (builtins.readFile /run/secrets/filerun-passwd) ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.luj.filerun = {
|
options.luj.filerun = {
|
||||||
|
@ -10,17 +12,23 @@ in
|
||||||
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
|
||||||
|
sops.secrets.filerun = {};
|
||||||
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
virtualisation.oci-containers.containers."filerun-mariadb" = {
|
virtualisation.oci-containers.containers."filerun-mariadb" = {
|
||||||
image = "mariadb:10.1";
|
image = "mariadb:10.1";
|
||||||
environment = {
|
environment = {
|
||||||
"MYSQL_ROOT_PASSWORD" = "randompasswd";
|
|
||||||
"MYSQL_USER" = "filerun";
|
"MYSQL_USER" = "filerun";
|
||||||
"MYSQL_PASSWORD" = "randompasswd";
|
|
||||||
"MYSQL_DATABASE" = "filerundb";
|
"MYSQL_DATABASE" = "filerundb";
|
||||||
"TZ" = "Europe/Paris";
|
"TZ" = "Europe/Paris";
|
||||||
};
|
};
|
||||||
|
environmentFiles = [
|
||||||
|
/run/secrets/filerun
|
||||||
|
];
|
||||||
volumes = [ "/home/delegator/filerun/db:/var/lib/mysql" ];
|
volumes = [ "/home/delegator/filerun/db:/var/lib/mysql" ];
|
||||||
extraOptions = [ "--network=filerun-br" ];
|
extraOptions = [ "--network=filerun-br" ];
|
||||||
};
|
};
|
||||||
|
@ -51,16 +59,18 @@ in
|
||||||
virtualisation.oci-containers.containers."filerun" = {
|
virtualisation.oci-containers.containers."filerun" = {
|
||||||
image = "afian/filerun:libreoffice";
|
image = "afian/filerun:libreoffice";
|
||||||
environment = {
|
environment = {
|
||||||
"FR_DB_HOST" = "filerun-mariadb"; # !! IMPORTANT
|
"FR_DB_HOST" = "filerun-mariadb";
|
||||||
"FR_DB_PORT" = "3306";
|
"FR_DB_PORT" = "3306";
|
||||||
"FR_DB_NAME" = "filerundb";
|
"FR_DB_NAME" = "filerundb";
|
||||||
"FR_DB_USER" = "filerun";
|
"FR_DB_USER" = "filerun";
|
||||||
"FR_DB_PASS" = "randompasswd";
|
|
||||||
"APACHE_RUN_USER" = "filerunuser";
|
"APACHE_RUN_USER" = "filerunuser";
|
||||||
"APACHE_RUN_USER_ID" = "1000";
|
"APACHE_RUN_USER_ID" = "1000";
|
||||||
"APACHE_RUN_GROUP" = "hello";
|
"APACHE_RUN_GROUP" = "hello";
|
||||||
"APACHE_RUN_GROUP_ID" = "100";
|
"APACHE_RUN_GROUP_ID" = "100";
|
||||||
};
|
};
|
||||||
|
environmentFiles = [
|
||||||
|
/run/secrets/filerun
|
||||||
|
];
|
||||||
ports = [ "2000:80" ];
|
ports = [ "2000:80" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/home/delegator/filerun/web:/var/www/html"
|
"/home/delegator/filerun/web:/var/www/html"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue