doc: add an example configuration for developers, fix #484

This commit is contained in:
lesion 2024-12-23 10:58:26 +01:00
parent 56bfae18f3
commit 737d9ea019
No known key found for this signature in database
GPG key ID: 352918250B012177
3 changed files with 42 additions and 5 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
*.sqlite
_*.js
config*.json
!config.example.json
tests/seeds/testdb.sqlite
gancio.sqlite
db.sqlite

27
config.example.json Normal file
View file

@ -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": {}
}
}

View file

@ -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.