summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-11-11 19:19:25 +0100
committerxengineering <me@xengineering.eu>2022-11-11 19:19:25 +0100
commitbdefa29fb2395eec79564145186d9ad1ec45dff3 (patch)
tree85d06816b7ba683d8038aaac6d940c3fb23d76bc /config
parente5760e3e1832ddb74885acbc93e39c9659c90d0c (diff)
downloadceres-bdefa29fb2395eec79564145186d9ad1ec45dff3.tar
ceres-bdefa29fb2395eec79564145186d9ad1ec45dff3.tar.zst
ceres-bdefa29fb2395eec79564145186d9ad1ec45dff3.zip
Restrict configuration to config file
This drops also the -d flag and the database/user config option. The -d flag used to override specific parts of the config file. This is just confusing behaviour. Instead a new config/debug.json file is introduced with useful default values. Instead of configuring the database user via the database/user entry in the config file, the user is determined from the Linux user of the server process. This enforces that a database user with the same name as the Linux user is configured which is already described in the README.
Diffstat (limited to 'config')
-rw-r--r--config/debug.json14
-rw-r--r--config/default.json4
2 files changed, 16 insertions, 2 deletions
diff --git a/config/debug.json b/config/debug.json
new file mode 100644
index 0000000..7d1295b
--- /dev/null
+++ b/config/debug.json
@@ -0,0 +1,14 @@
+{
+ "http":{
+ "bind_host":"127.0.0.1",
+ "bind_port":"8080",
+ "static":"./data/static",
+ "templates":"./data/templates",
+ "storage":"./data/storage"
+ },
+ "database":{
+ "socket":"/run/mysqld/mysqld.sock",
+ "database":"ceres",
+ "migrations":"./sql"
+ }
+}
diff --git a/config/default.json b/config/default.json
index 076d672..7710774 100644
--- a/config/default.json
+++ b/config/default.json
@@ -8,7 +8,7 @@
},
"database":{
"socket":"/run/mysqld/mysqld.sock",
- "user":"ceres",
- "database":"ceres"
+ "database":"ceres",
+ "migrations":"/usr/share/ceres/migrations"
}
}