1import ./make-test.nix ({ pkgs, ... }:
2
3{
4 name = "wordpress";
5 meta = with pkgs.stdenv.lib.maintainers; {
6 maintainers = [ grahamc ]; # under duress!
7 };
8
9 nodes =
10 { web =
11 { config, pkgs, ... }:
12 {
13 services.mysql = {
14 enable = true;
15 package = pkgs.mysql;
16 };
17 services.httpd = {
18 enable = true;
19 logPerVirtualHost = true;
20 adminAddr="js@lastlog.de";
21 extraModules = [
22 { name = "php7"; path = "${pkgs.php}/modules/libphp7.so"; }
23 ];
24
25 virtualHosts = [
26 {
27 hostName = "wordpress";
28 extraSubservices =
29 [
30 {
31 serviceType = "wordpress";
32 dbPassword = "wordpress";
33 wordpressUploads = "/data/uploads";
34 languages = [ "de_DE" "en_GB" ];
35 }
36 ];
37 }
38 ];
39 };
40 };
41 };
42
43 testScript =
44 { nodes, ... }:
45 ''
46 startAll;
47
48 $web->waitForUnit("mysql");
49 $web->waitForUnit("httpd");
50
51 $web->succeed("curl -L 127.0.0.1:80 | grep 'Welcome to the famous'");
52
53
54 '';
55
56})