Move Gitea to Postgres
Migration is nontrivial and SUCKS DICK but whatever
This commit is contained in:
parent
7c506157f7
commit
2a1299e9e0
@ -53,7 +53,9 @@ psql:
|
||||
## WEBAPPS
|
||||
# Gitea
|
||||
gitea:
|
||||
mysql_password: !vault |
|
||||
db:
|
||||
hostname: 172.31.47.215
|
||||
pass: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
62353264353465316661353738666161313036373761666163663733656461316536636334386335
|
||||
6161386630663739363439383237343065333239613134610a383036373735326536386464343164
|
||||
|
@ -3,23 +3,24 @@
|
||||
---
|
||||
- name: Set up Gitea
|
||||
block:
|
||||
- name: Set up MySQL
|
||||
- name: Set up PostgreSQL
|
||||
block:
|
||||
- name: Create DB user
|
||||
postgresql_user:
|
||||
name: gitea
|
||||
password: "{{ gitea.db.pass }}"
|
||||
login_host: "{{ gitea.db.hostname }}"
|
||||
login_user: "{{ psql.ansible.user }}"
|
||||
login_password: "{{ psql.ansible.pass }}"
|
||||
- name: Create DB
|
||||
mysql_db:
|
||||
postgresql_db:
|
||||
name: gitea
|
||||
login_user: root
|
||||
login_password: "{{ mysql.root_password }}"
|
||||
state: present
|
||||
notify: gitea add default user
|
||||
- name: Create user
|
||||
mysql_user:
|
||||
name: gitea
|
||||
host: localhost
|
||||
password: "{{ gitea.mysql_password }}"
|
||||
priv: "gitea.*:ALL,GRANT"
|
||||
login_user: root
|
||||
login_password: "{{ mysql.root_password }}"
|
||||
owner: gitea
|
||||
encoding: UNICODE
|
||||
login_host: "{{ gitea.db.hostname }}"
|
||||
login_user: "{{ psql.ansible.user }}"
|
||||
login_password: "{{ psql.ansible.pass }}"
|
||||
tags: [ postgresql ]
|
||||
- name: Set up Apache
|
||||
block:
|
||||
- name: Enable modules
|
||||
|
@ -3,11 +3,11 @@ RUN_USER = git
|
||||
RUN_MODE = prod
|
||||
|
||||
[database]
|
||||
DB_TYPE = mysql
|
||||
HOST = 127.0.0.1:3306
|
||||
DB_TYPE = postgres
|
||||
HOST = {{ gitea.db.hostname }}:5432
|
||||
NAME = gitea
|
||||
USER = gitea
|
||||
PASSWD = {{ gitea.mysql_password }}
|
||||
PASSWD = {{ gitea.db.pass }}
|
||||
SSL_MODE = disable
|
||||
CHARSET = utf8
|
||||
PATH = /var/lib/gitea/data/gitea.db
|
||||
|
@ -27,7 +27,6 @@
|
||||
login_host: "{{ nextcloud.db.hostname }}"
|
||||
login_user: "{{ psql.ansible.user }}"
|
||||
login_password: "{{ psql.ansible.pass }}"
|
||||
when: nextcloud.db.hostname is defined
|
||||
tags: [ postgresql ]
|
||||
- name: Set up Apache
|
||||
block:
|
||||
|
Loading…
Reference in New Issue
Block a user