Move Gitea to Postgres
Migration is nontrivial and SUCKS DICK but whatever
This commit is contained in:
parent
7c506157f7
commit
2a1299e9e0
@ -53,14 +53,16 @@ psql:
|
|||||||
## WEBAPPS
|
## WEBAPPS
|
||||||
# Gitea
|
# Gitea
|
||||||
gitea:
|
gitea:
|
||||||
mysql_password: !vault |
|
db:
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
hostname: 172.31.47.215
|
||||||
62353264353465316661353738666161313036373761666163663733656461316536636334386335
|
pass: !vault |
|
||||||
6161386630663739363439383237343065333239613134610a383036373735326536386464343164
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
31346337636665356630336234306534646362386663633734353166373761316139313734306630
|
62353264353465316661353738666161313036373761666163663733656461316536636334386335
|
||||||
3364306566323666310a323034303434613237643665643637633430353437316339356463646331
|
6161386630663739363439383237343065333239613134610a383036373735326536386464343164
|
||||||
33353062343164396465326365653561626363343961326363633231303736316436643935646161
|
31346337636665356630336234306534646362386663633734353166373761316139313734306630
|
||||||
3933353234613430373930663832643934613233383635613433
|
3364306566323666310a323034303434613237643665643637633430353437316339356463646331
|
||||||
|
33353062343164396465326365653561626363343961326363633231303736316436643935646161
|
||||||
|
3933353234613430373930663832643934613233383635613433
|
||||||
app_name: "9iron Gitea"
|
app_name: "9iron Gitea"
|
||||||
disable_registration: "false"
|
disable_registration: "false"
|
||||||
url: "git.9iron.club"
|
url: "git.9iron.club"
|
||||||
|
@ -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