You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-3Lines changed: 50 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,17 +80,64 @@ Make sure to replace `/path/to/host` with your preferred root directory for conf
80
80
81
81
## ⚙️ Configuration
82
82
83
-
In the [config](./config/) directory are a couple of starter configuration files for prod and dev environments. The server expects a config.yaml in the config directory and will load settings from it when started.
83
+
In the [config](./apiserver/config/) directory are a couple of starter configuration files for prod and dev environments. The server expects a config.yaml in the config directory and will load settings from it when started.
84
84
85
-
**Note:** You can set `email.host`, `email.port`, `email.email`, `email.password` and `jwt.secret` using environment variables `TW_EMAIL_HOST`, `TW_EMAIL_PORT`, `TW_EMAIL_SENDER`, `TW_EMAIL_PASSWORD` and `TW_JWT_SECRET` for improved security and flexibility. The server will fail to start if `jwt.secret` is left as `"secret"`, so be sure to set `TW_JWT_SECRET` or edit `config.yaml`.
85
+
**Note:** You can set `email.host`, `email.port`, `email.email`, `email.password`, `jwt.secret`, and database credentials using environment variables for improved security and flexibility. The server will fail to start if `jwt.secret` is left as `"secret"`, so be sure to set `TW_JWT_SECRET` or edit `config.yaml`.
86
+
87
+
### Database Configuration
88
+
89
+
Task Wizard supports both SQLite and MySQL databases. By default, it uses SQLite.
90
+
91
+
#### SQLite (default)
92
+
93
+
To use SQLite, set `database.type` to `sqlite` (or leave it unset) in your `config.yaml`:
94
+
95
+
```yaml
96
+
database:
97
+
type: sqlite
98
+
path: /config/task-wizard.db
99
+
migration: true
100
+
```
101
+
102
+
#### MySQL
103
+
104
+
To use MySQL, configure the database section:
105
+
106
+
```yaml
107
+
database:
108
+
type: mysql
109
+
host: localhost
110
+
port: 3306
111
+
database: taskwizard
112
+
username: taskuser
113
+
password: taskpass
114
+
migration: true
115
+
```
116
+
117
+
You can also use environment variables for database configuration:
118
+
119
+
- `TW_DATABASE_TYPE`- Database type (sqlite or mysql)
120
+
- `TW_DATABASE_HOST`- Database host
121
+
- `TW_DATABASE_PORT`- Database port
122
+
- `TW_DATABASE_NAME`- Database name
123
+
- `TW_DATABASE_USERNAME`- Database username
124
+
- `TW_DATABASE_PASSWORD`- Database password
125
+
126
+
### Configuration Reference
86
127
87
128
The configuration files are yaml mappings with the following values:
88
129
89
130
| Configuration Entry | Default Value | Description |
0 commit comments