mob next [ci-skip] [ci skip] [skip ci]

lastFile:modules/nixos/think-backend-gtcm.nix
This commit is contained in:
2025-11-25 16:26:04 +07:00
parent dbc19a33de
commit e9c0060478
4 changed files with 23 additions and 267 deletions

View File

@@ -3,11 +3,6 @@
nodes =
let
settings = {
APP_SERVICES_CACHE = "/run/think-gtcm/cache/services.php";
APP_PACKAGES_CACHE = "/run/think-gtcm/cache/packages.php";
APP_CONFIG_CACHE = "/run/think-gtcm/cache/config.php";
APP_ROUTES_CACHE = "/run/think-gtcm/cache/routes-v7.php";
APP_EVENTS_CACHE = "/run/think-gtcm/cache/events.php";
DB_CONNECTION = "mysql";
DB_HOST = "localhost";
@@ -67,17 +62,29 @@
imports = [ self.nixosModules.think-gtcm ];
services.think-greaterchiangmai = {
enable = true;
settings = settings;
settings = settings // {
APP_SERVICES_CACHE = "/run/think-gtcm/cache/services.php";
APP_PACKAGES_CACHE = "/run/think-gtcm/cache/packages.php";
APP_CONFIG_CACHE = "/run/think-gtcm/cache/config.php";
APP_ROUTES_CACHE = "/run/think-gtcm/cache/routes-v7.php";
APP_EVENTS_CACHE = "/run/think-gtcm/cache/events.php";
};
};
};
backend1 =
{ self, pkgs, ... }:
{
nixpkgs.overlays = [ self.overlays.packagesOverlay ];
imports = [ self.nixosModules.think-be-gtcm ];
imports = [ self.nixosModules.think-backend-gtcm ];
services.think-backend-greaterchiangmai = {
enable = true;
settings = settings;
settings = settings // {
APP_SERVICES_CACHE = "/run/think-backend-gtcm/cache/services.php";
APP_PACKAGES_CACHE = "/run/think-backend-gtcm/cache/packages.php";
APP_CONFIG_CACHE = "/run/think-backend-gtcm/cache/config.php";
APP_ROUTES_CACHE = "/run/think-backend-gtcm/cache/routes-v7.php";
APP_EVENTS_CACHE = "/run/think-backend-gtcm/cache/events.php";
};
};
};
};
@@ -89,7 +96,7 @@
gtcm1.wait_for_open_port(80)
output = gtcm1.succeed("curl localhost")
backend1.wait_for_unit("phpfpm-think-gtcm")
backend1.wait_for_unit("phpfpm-think-backend-gtcm")
backend1.wait_for_open_port(80)
output = backend1.succeed("curl localhost")
'';