mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
reorder gitea database config
This commit is contained in:
parent
1cb903924a
commit
32a1532f7a
3 changed files with 23 additions and 24 deletions
17
README.md
17
README.md
|
@ -117,6 +117,15 @@ Here is a deeper insight into the variables of this gitea role. For the exact fu
|
|||
### Database ([database](https://docs.gitea.io/en-us/config-cheat-sheet/#database-database))
|
||||
| variable name | default value | description |
|
||||
| ------------- | ------------- | ----------- |
|
||||
| `gitea_db_type` | `sqlite3` | The database type in use `[mysql, postgres, mssql, sqlite3]`. |
|
||||
| `gitea_db_host` | `127.0.0.0:3306` | Database host address and port or absolute path for unix socket [mysql, postgres] (ex: `/var/run/mysqld/mysqld.sock`). |
|
||||
| `gitea_db_name` | `root` | Database name |
|
||||
| `gitea_db_user` | `gitea` | Database username |
|
||||
| `gitea_db_password` | `lel` | Database password. **PLEASE CHANGE** |
|
||||
| `gitea_db_ssl` | `disable` | Configure SSL only if your database type supports it. Have a look into the [config-cheat-sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#database-database) for more detailed information |
|
||||
| `gitea_db_path` | `{{ gitea_home }}/data/gitea.db` | DB path, if you use `sqlite3`. |
|
||||
| `gitea_database_extra_config` | `''` | you can use this variable to pass additional config parameters in the `[ui]` section of the config. |
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -152,14 +161,6 @@ Here is a deeper insight into the variables of this gitea role. For the exact fu
|
|||
|
||||
### Database configuration
|
||||
|
||||
* `gitea_db_type`: Database type, can be `mysql`, `postgres` or `sqlite3`
|
||||
* `gitea_db_host`: Database host string `host:port` or `/run/postgresql/` when connectiong to postgres via local unix socket (peer authentication)
|
||||
* `gitea_db_name`: Database name
|
||||
* `gitea_db_user`: Database username
|
||||
* `gitea_db_password`: Database password
|
||||
* `gitea_db_ssl`: Use SSL ? (postgres only!). Can be `require`, `disable`, `verify-ca` or `verify-full`
|
||||
* `gitea_db_path`: DB path, if you use `sqlite3`. The default is good enough to work though.
|
||||
|
||||
### Mailer configuration
|
||||
|
||||
* `gitea_mailer_enabled`: Whether to enable the mailer. Default: `false`
|
||||
|
|
|
@ -52,6 +52,14 @@ gitea_server_extra_config: ''
|
|||
|
||||
# Database (database)
|
||||
# -> https://docs.gitea.io/en-us/config-cheat-sheet/#database-database
|
||||
gitea_db_type: 'sqlite3'
|
||||
gitea_db_host: '127.0.0.0:3306'
|
||||
gitea_db_name: 'root'
|
||||
gitea_db_user: 'gitea'
|
||||
gitea_db_password: 'lel'
|
||||
gitea_db_ssl: 'disable'
|
||||
gitea_db_path: "{{ gitea_home }}/data/gitea.db"
|
||||
|
||||
|
||||
# look and feel
|
||||
gitea_disable_gravatar: true
|
||||
|
@ -76,14 +84,6 @@ gitea_oauth2_jwt_secret: ''
|
|||
|
||||
|
||||
gitea_systemd_cap_net_bind_service: false
|
||||
gitea_db_type: sqlite3
|
||||
gitea_db_host: 127.0.0.0:3306
|
||||
gitea_db_name: root
|
||||
gitea_db_user: gitea
|
||||
gitea_db_password: lel
|
||||
gitea_db_ssl: disable
|
||||
gitea_db_path: "{{ gitea_home }}/data/gitea.db"
|
||||
|
||||
|
||||
|
||||
gitea_mailer_enabled: false
|
||||
|
|
|
@ -60,22 +60,20 @@ LFS_JWT_SECRET = {{ gitea_lfs_jwt_secret }}
|
|||
;
|
||||
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#database-database
|
||||
[database]
|
||||
; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
|
||||
DB_TYPE = {{ gitea_db_type }}
|
||||
HOST = {{ gitea_db_host }}
|
||||
NAME = {{ gitea_db_name }}
|
||||
USER = {{ gitea_db_user }}
|
||||
; Use PASSWD = `your password` for quoting if you use special characters in the password.
|
||||
PASSWD = {{ gitea_db_password }}
|
||||
; For Postgres, either "disable" (default), "require", "verify-ca" or "verify-full"
|
||||
; For MySQL, either "false" (default), "true", or "skip-verify"
|
||||
SSL_MODE = {{ gitea_db_ssl }}
|
||||
; For "sqlite3" and "tidb", use an absolute path when you start gitea as service
|
||||
PATH = {{ gitea_db_path }}
|
||||
PATH = {{ gitea_db_path }}
|
||||
{% if gitea_log_only_warning %}
|
||||
LOG_SQL = false
|
||||
LOG_SQL = false
|
||||
{% endif %}
|
||||
|
||||
{{ gitea_database_extra_config }}
|
||||
;
|
||||
;
|
||||
; -> https://docs.gitea.io/en-us/config-cheat-sheet/#indexer-indexer
|
||||
[indexer]
|
||||
; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
|
||||
ISSUE_INDEXER_PATH = {{ gitea_home }}/indexers/issues.bleve
|
||||
|
|
Loading…
Reference in a new issue