mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Add the support for mysql and postgres databases and documentation
This commit is contained in:
parent
59d3cfc7c8
commit
9d685ab7a5
3 changed files with 25 additions and 9 deletions
12
README.md
12
README.md
|
@ -89,6 +89,16 @@ The following have been tested with Debian 8, it should work on Ubuntu as well.
|
||||||
* `gitea_start_ssh`: Do you start the SSH server ? (true/false)
|
* `gitea_start_ssh`: Do you start the SSH server ? (true/false)
|
||||||
* `gitea_ssh_port`: SSH bind port
|
* `gitea_ssh_port`: SSH bind port
|
||||||
|
|
||||||
|
### Database configuration
|
||||||
|
|
||||||
|
* `gitea_db_type`: Database type, can be `mysql`, `postgres` or `sqlite3`
|
||||||
|
* `gitea_db_host`: Database host string `host:port`
|
||||||
|
* `gitea_db_name`: Database name
|
||||||
|
* `gitea_db_user`: Database username
|
||||||
|
* `gitea_db_passord`: Database password
|
||||||
|
* `gitea_db_ssl`: Use SSL ? (postgres only!). Can be `required`, `disable`, `verify-full`
|
||||||
|
* `gitea_db_path`: DB path, if you use `sqlite3`. The default is good enough to work though.
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
This module is currently a work in progress. For now it is only able to install
|
This module is currently a work in progress. For now it is only able to install
|
||||||
gitea from the Github Release, in a fixed version for Linux amd64, on systems
|
gitea from the Github Release, in a fixed version for Linux amd64, on systems
|
||||||
|
@ -97,8 +107,6 @@ using systemd.
|
||||||
This said, it should work on every major Linux distribution, it has been tested
|
This said, it should work on every major Linux distribution, it has been tested
|
||||||
successfully on Debian Jessie 64 bits.
|
successfully on Debian Jessie 64 bits.
|
||||||
|
|
||||||
Also it only supports the sqlite3 driver for now, but I'll improve soon.
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Do not hesitate to make me a pull request, and when in doubt you can reach me on
|
Do not hesitate to make me a pull request, and when in doubt you can reach me on
|
||||||
Twitter [@thomas_maurice](https://twitter.com/thomas_maurice).
|
Twitter [@thomas_maurice](https://twitter.com/thomas_maurice).
|
||||||
|
|
|
@ -12,6 +12,14 @@ gitea_http_port: 3000
|
||||||
gitea_disable_http_git: false
|
gitea_disable_http_git: false
|
||||||
gitea_offline_mode: true
|
gitea_offline_mode: true
|
||||||
|
|
||||||
|
gitea_db_type: sqlite3
|
||||||
|
gitea_db_host: 127.0.0.0:3306
|
||||||
|
gitea_db_name: root
|
||||||
|
gitea_db_user: gitea
|
||||||
|
gitea_db_passord: lel
|
||||||
|
gitea_db_ssl: disable
|
||||||
|
gitea_db_path: "{{ gitea_home }}/data/gitea.db"
|
||||||
|
|
||||||
gitea_ssh_listen: 0.0.0.0
|
gitea_ssh_listen: 0.0.0.0
|
||||||
gitea_ssh_domain: localhost
|
gitea_ssh_domain: localhost
|
||||||
gitea_start_ssh: true
|
gitea_start_ssh: true
|
||||||
|
|
|
@ -148,15 +148,15 @@ DSA = 1024
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
; Either "mysql", "postgres" or "sqlite3", it's your choice
|
; Either "mysql", "postgres" or "sqlite3", it's your choice
|
||||||
DB_TYPE = sqlite3
|
DB_TYPE = {{ gitea_db_type }}
|
||||||
HOST = 127.0.0.1:3306
|
HOST = {{ gitea_db_host }}
|
||||||
NAME = gitea
|
NAME = {{ gitea_db_name }}
|
||||||
USER = root
|
USER = {{ gitea_db_user }}
|
||||||
PASSWD =
|
PASSWD = {{ gitea_db_passord }}
|
||||||
; For "postgres" only, either "disable", "require" or "verify-full"
|
; For "postgres" only, either "disable", "require" or "verify-full"
|
||||||
SSL_MODE = disable
|
SSL_MODE = {{ gitea_db_ssl }}
|
||||||
; For "sqlite3" and "tidb", use absolute path when you start as service
|
; For "sqlite3" and "tidb", use absolute path when you start as service
|
||||||
PATH = {{ gitea_home }}/data/gitea.db
|
PATH = {{ gitea_db_path }}
|
||||||
|
|
||||||
[admin]
|
[admin]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue