mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/dokuwiki: add <name?> option
Enables multi-site configurations. This break compatibility with prior configurations that expect options for a single dokuwiki instance in `services.dokuwiki`.
This commit is contained in:
parent
e233a9d4dd
commit
dc7ed06615
2 changed files with 125 additions and 76 deletions
|
@ -1,29 +1,42 @@
|
|||
import ./make-test-python.nix ({ lib, ... }:
|
||||
|
||||
with lib;
|
||||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "dokuwiki";
|
||||
meta.maintainers = with maintainers; [ maintainers."1000101" ];
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ "1000101" ];
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{ services.dokuwiki = {
|
||||
enable = true;
|
||||
acl = " ";
|
||||
superUser = null;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
machine = { ... }: {
|
||||
services.dokuwiki."site1.local" = {
|
||||
acl = " ";
|
||||
superUser = null;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
services.dokuwiki."site2.local" = {
|
||||
acl = " ";
|
||||
superUser = null;
|
||||
nginx = {
|
||||
forceSSL = false;
|
||||
enableACME = false;
|
||||
};
|
||||
};
|
||||
networking.hosts."127.0.0.1" = [ "site1.local" "site2.local" ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.start()
|
||||
machine.wait_for_unit("phpfpm-dokuwiki.service")
|
||||
site_names = ["site1.local", "site2.local"]
|
||||
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("phpfpm-dokuwiki-site1.local.service")
|
||||
machine.wait_for_unit("phpfpm-dokuwiki-site2.local.service")
|
||||
|
||||
machine.wait_for_unit("nginx.service")
|
||||
|
||||
machine.wait_for_open_port(80)
|
||||
machine.succeed("curl -sSfL http://localhost/ | grep 'DokuWiki'")
|
||||
|
||||
machine.succeed("curl -sSfL http://site1.local/ | grep 'DokuWiki'")
|
||||
machine.succeed("curl -sSfL http://site2.local/ | grep 'DokuWiki'")
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue