Use host MariaDB in Gitea container

This commit is contained in:
2022-08-11 21:04:07 -04:00
parent 9eefad0e87
commit b255680a7a
8 changed files with 41 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ gitea_rooturl: "http://{{ gitea_domain }}"
gitea_signup: true
# database settings
gitea_dbtype: postgres
gitea_dbtype: mysql
gitea_dbhost: host.docker.internal
gitea_dbname: "{{ gitea_name }}"
gitea_dbuser: "{{ gitea_name }}"

View File

@@ -4,18 +4,19 @@
state: directory
- name: Create Gitea database
postgresql_db:
mysql_db:
name: "{{ gitea_dbname }}"
become: true
become_user: postgres
state: present
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: Create Gitea database user
postgresql_user:
db: "{{ gitea_dbname }}"
mysql_user:
name: "{{ gitea_dbuser }}"
password: "{{ gitea_dbpass }}"
become: true
become_user: postgres
host: '%'
state: present
priv: "{{ gitea_dbname }}.*:ALL"
login_unix_socket: /var/run/mysqld/mysqld.sock
- name: Create git user
user: