Skip to content

Commit

Permalink
ncm-metaconfig: add basic pakiti3 server config (#1548)
Browse files Browse the repository at this point in the history
* ncm-metaconfig: add basic pakiti3 server config
  • Loading branch information
wdpypere authored Oct 7, 2022
1 parent 11ee8e3 commit d2b3c27
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
unique template metaconfig/pakiti/server_config3;

include 'metaconfig/pakiti/server_schema3';
bind "/software/components/metaconfig/services/{/etc/pakiti/Config.php}/contents" = pakiti_server3;
prefix "/software/components/metaconfig/services/{/etc/pakiti/Config.php}";
"module" = "pakiti/server3";
"convert/doublequote" = true;

11 changes: 11 additions & 0 deletions ncm-metaconfig/src/main/metaconfig/pakiti/pan/server_schema3.pan
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
declaration template metaconfig/pakiti/server_schema3;

include 'pan/types';

type pakiti_server3 = {
'dbhost' : type_hostname
'dbname' : string_trimmed = 'pakiti'
'dbpassword' : string_trimmed
'dbuser': string_trimmed = 'pakiti'
'name' : string_trimmed
};
12 changes: 12 additions & 0 deletions ncm-metaconfig/src/main/metaconfig/pakiti/server3.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

final class Config extends DefaultConfig
{
public static $DB_HOST = [% dbhost %];
public static $DB_NAME = [% dbname %];
public static $DB_USER = [% dbuser %];
public static $DB_PASSWORD = [% dbpassword %];
public static $PAKITI_NAME = [% name %];
}

?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
object template config_server3;

include 'metaconfig/pakiti/server_config3';

prefix "/software/components/metaconfig/services/{/etc/pakiti/Config.php}/contents";
"name" = "pakiti.wn.iihe.ac.be";
"dbhost" = "localhost";
"dbname" = "pakiti";
"dbuser" = "pakiti";
"dbpassword" = "password";
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Base test for config_server3
---
/etc/pakiti/Config.php
multiline
---
\<\?php

final class Config extends DefaultConfig
\{
public static \$DB_HOST = "localhost";
public static \$DB_NAME = "pakiti";
public static \$DB_USER = "pakiti";
public static \$DB_PASSWORD = "password";
public static \$PAKITI_NAME = "pakiti.wn.iihe.ac.be";
\}

\?\>

0 comments on commit d2b3c27

Please sign in to comment.