From 737d9ea019cb73752c30b8c7f36739d6ccacd5fd Mon Sep 17 00:00:00 2001 From: lesion Date: Mon, 23 Dec 2024 10:58:26 +0100 Subject: [PATCH] doc: add an example configuration for developers, fix #484 --- .gitignore | 1 + config.example.json | 27 +++++++++++++++++++++++++++ docs/dev/dev.md | 19 ++++++++++++++----- 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 config.example.json diff --git a/.gitignore b/.gitignore index 023cbd6a..818d3bd4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.sqlite _*.js config*.json +!config.example.json tests/seeds/testdb.sqlite gancio.sqlite db.sqlite diff --git a/config.example.json b/config.example.json new file mode 100644 index 00000000..a91eac9a --- /dev/null +++ b/config.example.json @@ -0,0 +1,27 @@ +{ + "baseurl": "http://127.0.0.1:13120", + "server": { + "host": "127.0.0.1", + "port": 13120 + }, + "log_level": "debug", + "log_path": "./logs", + "db": { + "dialect": "sqlite", + "storage": "./gancio.sqlite", + "logging": false + }, + "user_locale": "./user_locale", + "upload_path": "./uploads", + "proxy": { + "protocol": "", + "hostname": "", + "host": "", + "port": "", + "auth": { + "username": "", + "password": "" + }, + "headers": {} + } +} \ No newline at end of file diff --git a/docs/dev/dev.md b/docs/dev/dev.md index ba0a6caa..2c4479b6 100644 --- a/docs/dev/dev.md +++ b/docs/dev/dev.md @@ -29,17 +29,26 @@ git clone https://framagit.org/les/gancio yarn ``` -4. Run db migrations +4. Use a default sqlite configuration +```bash +cp config.example.json config.json +``` + +5. Run db migrations ```bash ./node_modules/.bin/sequelize db:migrate ``` -5. Hacking +6. Create a first admin user +You can skip this step and register an user from the UI, the first registered user will be an active administrator. + +```bash +./server/cli.js users create admin secret-password admin +``` + +7. Hacking ```bash yarn dev ``` -> warning "Warning" -> You need to register a first user, this will be an active administrator! - Please use the [issues](https://framagit.org/les/gancio/-/issues) to discuss any modification.