Skip to content

Commit

Permalink
wip: add syslog error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Chickensoupwithrice committed Sep 9, 2023
1 parent 1030b3d commit 0b229c6
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions modules/flarum.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ let
opt = options.services.flarum;

flarumInstallConfig = pkgs.writeText "config.php" ''
<?php return array (
<?php return array (
'debug' => false, // enables or disables debug mode, used to troubleshoot issues
'offline' => false, // enables or disables site maintenance mode. This makes your site inaccessible to all users (including admins).
'database' =>
array (
'driver' => 'mysql', // the database driver, i.e. MySQL, MariaDB...
'host' => 'localhost', // the host of the connection, localhost in most cases unless using an external service
'database' => 'flarum', // the name of the database in the instance
'username' => 'root', // database username
'password' => \'\',
'username' => 'flarum', // database username
'password' => ' ',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => \'\', // the prefix for the tables, useful if you are sharing the same database with another service
'prefix' => ' ', // the prefix for the tables, useful if you are sharing the same database with another service
'port' => '3306', // the port of the connection, defaults to 3306 with MySQL
'strict' => false,
),
'url' => 'https://flarum.localhost', // the URL installation, you will want to change this if you change domains
'url' => 'http://localhost', // the URL installation, you will want to change this if you change domains
'paths' =>
array (
'api' => 'api', // /api goes to the API
Expand Down Expand Up @@ -147,6 +147,7 @@ in {
"pm.start_servers" = mkDefault 2;
"pm.min_spare_servers" = mkDefault 1;
"pm.max_spare_servers" = mkDefault 3;
"error_log" = "syslog";
};
};

Expand Down Expand Up @@ -202,13 +203,13 @@ in {
ln -sf ${cfg.package}/build/vendor .
ln -sf ${cfg.package}/build/public/index.php public/
chmod a+x . public
'';
# + lib.optionalString
# (cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
# cp ${flarumInstallConfig} .
# php flarum migrate
# php flarum cache:clear
# '';
''
+ lib.optionalString
(cfg.createDatabaseLocally && cfg.database.driver == "mysql") ''
cp ${flarumInstallConfig} ${cfg.stateDir}/config.php
php flarum cache:clear
'';
# php flarum migrate
};
};
}

0 comments on commit 0b229c6

Please sign in to comment.