mob next [ci-skip] [ci skip] [skip ci]
lastFile:tests/tests/think-gtcm.nix
This commit is contained in:
@@ -1,79 +1,96 @@
|
|||||||
(import ../lib.nix) {
|
(import ../lib.nix) {
|
||||||
name = "think-gtcm";
|
name = "think-gtcm";
|
||||||
nodes = {
|
nodes =
|
||||||
# `self` here is set by using specialArgs in `lib.nix`
|
let
|
||||||
node1 =
|
settings = {
|
||||||
{ self, pkgs, ... }:
|
APP_SERVICES_CACHE = "/run/think-gtcm/cache/services.php";
|
||||||
{
|
APP_PACKAGES_CACHE = "/run/think-gtcm/cache/packages.php";
|
||||||
nixpkgs.overlays = [ self.overlays.packagesOverlay ];
|
APP_CONFIG_CACHE = "/run/think-gtcm/cache/config.php";
|
||||||
imports = [ self.nixosModules.think-gtcm ];
|
APP_ROUTES_CACHE = "/run/think-gtcm/cache/routes-v7.php";
|
||||||
services.think-greaterchiangmai = {
|
APP_EVENTS_CACHE = "/run/think-gtcm/cache/events.php";
|
||||||
enable = true;
|
|
||||||
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_CONNECTION = "mysql";
|
||||||
DB_HOST = "localhost";
|
DB_HOST = "localhost";
|
||||||
DB_PORT = 3306;
|
DB_PORT = 3306;
|
||||||
DB_DATABASE = "thinkgtcm";
|
DB_DATABASE = "thinkgtcm";
|
||||||
DB_USERNAME = "gtcm";
|
DB_USERNAME = "gtcm";
|
||||||
DB_PASSWORD = "";
|
DB_PASSWORD = "";
|
||||||
|
|
||||||
APP_NAME = "Laravel";
|
APP_NAME = "Laravel";
|
||||||
APP_ENV = "local";
|
APP_ENV = "local";
|
||||||
APP_DEBUG = "false";
|
APP_DEBUG = "false";
|
||||||
APP_URL = "http://localhost";
|
APP_URL = "http://localhost";
|
||||||
|
|
||||||
LOG_CHANNEL = "stack";
|
LOG_CHANNEL = "stack";
|
||||||
LOG_LEVEL = "debug";
|
LOG_LEVEL = "debug";
|
||||||
|
|
||||||
BROADCAST_DRIVER = "log";
|
BROADCAST_DRIVER = "log";
|
||||||
CACHE_DRIVER = "file";
|
CACHE_DRIVER = "file";
|
||||||
FILESYSTEM_DISK = "local";
|
FILESYSTEM_DISK = "local";
|
||||||
QUEUE_CONNECTION = "sync";
|
QUEUE_CONNECTION = "sync";
|
||||||
SESSION_DRIVER = "file";
|
SESSION_DRIVER = "file";
|
||||||
SESSION_LIFETIME = "120";
|
SESSION_LIFETIME = "120";
|
||||||
|
|
||||||
MEMCACHED_HOST = "127.0.0.1";
|
MEMCACHED_HOST = "127.0.0.1";
|
||||||
|
|
||||||
REDIS_HOST = "127.0.0.1";
|
REDIS_HOST = "127.0.0.1";
|
||||||
REDIS_PASSWORD = "null";
|
REDIS_PASSWORD = "null";
|
||||||
REDIS_PORT = "6379";
|
REDIS_PORT = "6379";
|
||||||
|
|
||||||
MAIL_MAILER = "smtp";
|
MAIL_MAILER = "smtp";
|
||||||
MAIL_HOST = "mailpit";
|
MAIL_HOST = "mailpit";
|
||||||
MAIL_PORT = "1025";
|
MAIL_PORT = "1025";
|
||||||
MAIL_USERNAME = "null";
|
MAIL_USERNAME = "null";
|
||||||
MAIL_PASSWORD = "null";
|
MAIL_PASSWORD = "null";
|
||||||
MAIL_ENCRYPTION = "null";
|
MAIL_ENCRYPTION = "null";
|
||||||
MAIL_FROM_ADDRESS = "hello@example.com";
|
MAIL_FROM_ADDRESS = "hello@example.com";
|
||||||
|
|
||||||
AWS_DEFAULT_REGION = "us-east-1";
|
AWS_DEFAULT_REGION = "us-east-1";
|
||||||
AWS_USE_PATH_STYLE_ENDPOINT = "false";
|
AWS_USE_PATH_STYLE_ENDPOINT = "false";
|
||||||
|
|
||||||
PUSHER_PORT = 443;
|
PUSHER_PORT = 443;
|
||||||
PUSHER_SCHEME = "https";
|
PUSHER_SCHEME = "https";
|
||||||
PUSHER_APP_CLUSTER = "mt1";
|
PUSHER_APP_CLUSTER = "mt1";
|
||||||
|
|
||||||
UPLOAD_MAX_FILESIZE = "5000M";
|
UPLOAD_MAX_FILESIZE = "5000M";
|
||||||
POST_MAX_SIZE = "5000M";
|
POST_MAX_SIZE = "5000M";
|
||||||
|
|
||||||
TEST_LOCAL = "false";
|
|
||||||
|
|
||||||
|
TEST_LOCAL = "false";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# `self` here is set by using specialArgs in `lib.nix`
|
||||||
|
gtcm1 =
|
||||||
|
{ self, pkgs, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ self.overlays.packagesOverlay ];
|
||||||
|
imports = [ self.nixosModules.think-gtcm ];
|
||||||
|
services.think-greaterchiangmai = {
|
||||||
|
enable = true;
|
||||||
|
settings = settings;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
backend1 =
|
||||||
};
|
{ self, pkgs, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [ self.overlays.packagesOverlay ];
|
||||||
|
imports = [ self.nixosModules.think-be-gtcm ];
|
||||||
|
services.think-backend-greaterchiangmai = {
|
||||||
|
enable = true;
|
||||||
|
settings = settings;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
# This is the test code that will check if our service is running correctly:
|
# This is the test code that will check if our service is running correctly:
|
||||||
testScript = ''
|
testScript = ''
|
||||||
start_all()
|
start_all()
|
||||||
|
|
||||||
node1.wait_for_unit("phpfpm-think-gtcm")
|
gtcm1.wait_for_unit("phpfpm-think-gtcm")
|
||||||
node1.wait_for_open_port(80)
|
gtcm1.wait_for_open_port(80)
|
||||||
output = node1.succeed("curl localhost")
|
output = gtcm1.succeed("curl localhost")
|
||||||
|
|
||||||
|
backend1.wait_for_unit("phpfpm-think-gtcm")
|
||||||
|
backend1.wait_for_open_port(80)
|
||||||
|
output = backend1.succeed("curl localhost")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user