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