Revert back to sqlite
This commit is contained in:
parent
5cbc438ff6
commit
1f515b36f0
|
@ -83,28 +83,20 @@ SSH_SERVER_MACS = hmac-sha2-512-etm@openssh.com, hmac-sha2-256-etm@openssh.com,
|
||||||
|
|
||||||
; TODO
|
; TODO
|
||||||
; ; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
|
; ; Either "mysql", "postgres", "mssql" or "sqlite3", it's your choice
|
||||||
; DB_TYPE = mysql
|
DB_TYPE = sqlite3
|
||||||
; HOST = 127.0.0.1:3306
|
; HOST = mariadb:3306
|
||||||
; NAME = gitea
|
; NAME = gitea
|
||||||
; USER = root
|
; USER = gitea
|
||||||
; PASSWD =
|
; PASSWD = "${mysql-password}"
|
||||||
; ; For "postgres" only, either "disable", "require" or "verify-full"
|
; ; For "postgres" only, either "disable", "require" or "verify-full"
|
||||||
; SSL_MODE = disable
|
; SSL_MODE = disable
|
||||||
; ; 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 = data/gitea.db
|
PATH = data/gitea.db
|
||||||
; ; For "sqlite3" only. Query timeout
|
; ; For "sqlite3" only. Query timeout
|
||||||
; SQLITE_TIMEOUT = 500
|
; SQLITE_TIMEOUT = 500
|
||||||
; ; For iterate buffer, default is 50
|
; ; For iterate buffer, default is 50
|
||||||
; ITERATE_BUFFER_SIZE = 50
|
; ITERATE_BUFFER_SIZE = 50
|
||||||
|
|
||||||
PATH = /data/gitea/gitea.db
|
|
||||||
DB_TYPE = sqlite3
|
|
||||||
HOST = localhost:3306
|
|
||||||
NAME = gitea
|
|
||||||
USER = root
|
|
||||||
PASSWD =
|
|
||||||
SSL_MODE = disable
|
|
||||||
|
|
||||||
[session]
|
[session]
|
||||||
PROVIDER_CONFIG = /data/gitea/sessions
|
PROVIDER_CONFIG = /data/gitea/sessions
|
||||||
PROVIDER = file
|
PROVIDER = file
|
||||||
|
|
|
@ -15,5 +15,6 @@ data "template_file" "gitea-config-file" {
|
||||||
internal_token = "${var.internal-token}"
|
internal_token = "${var.internal-token}"
|
||||||
smtp_password = "${var.smtp-password}"
|
smtp_password = "${var.smtp-password}"
|
||||||
lfs-jwt-secret = "${var.lfs-jwt-secret}"
|
lfs-jwt-secret = "${var.lfs-jwt-secret}"
|
||||||
|
mysql-password = "${var.mysql-password}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,6 +61,7 @@ resource "docker_container" "gitea" {
|
||||||
must_run = true
|
must_run = true
|
||||||
links = [
|
links = [
|
||||||
"gitea-redis",
|
"gitea-redis",
|
||||||
|
"mariadb",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
resource "mysql_database" "gitea" {
|
||||||
|
name = "gitea"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "mysql_user" "gitea" {
|
||||||
|
user = "gitea"
|
||||||
|
host = "%"
|
||||||
|
plaintext_password = "${var.mysql-password}"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "mysql_grant" "gitea" {
|
||||||
|
user = "${mysql_user.gitea.user}"
|
||||||
|
host = "${mysql_user.gitea.host}"
|
||||||
|
database = "${mysql_database.gitea.name}"
|
||||||
|
privileges = ["ALL"]
|
||||||
|
}
|
|
@ -12,3 +12,4 @@ variable "secret-key" {}
|
||||||
variable "internal-token" {}
|
variable "internal-token" {}
|
||||||
variable "smtp-password" {}
|
variable "smtp-password" {}
|
||||||
variable "lfs-jwt-secret" {}
|
variable "lfs-jwt-secret" {}
|
||||||
|
variable "mysql-password" {}
|
||||||
|
|
1
main.tf
1
main.tf
|
@ -43,6 +43,7 @@ module "gitea" {
|
||||||
internal-token = "${var.gitea-internal-token}"
|
internal-token = "${var.gitea-internal-token}"
|
||||||
smtp-password = "${var.gitea-smtp-password}"
|
smtp-password = "${var.gitea-smtp-password}"
|
||||||
lfs-jwt-secret = "${var.gitea-lfs-jwt-secret}"
|
lfs-jwt-secret = "${var.gitea-lfs-jwt-secret}"
|
||||||
|
mysql-password = "${var.gitea-mysql-password}"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "radicale" {
|
module "radicale" {
|
||||||
|
|
|
@ -22,6 +22,7 @@ variable "mysql_airsonic_password" {}
|
||||||
variable "mysql_kodi_password" {}
|
variable "mysql_kodi_password" {}
|
||||||
|
|
||||||
variable "mysql-ttrss-password" {}
|
variable "mysql-ttrss-password" {}
|
||||||
|
variable "gitea-mysql-password" {}
|
||||||
|
|
||||||
variable "wiki_session_secret" {
|
variable "wiki_session_secret" {
|
||||||
type = "string"
|
type = "string"
|
||||||
|
|
Loading…
Reference in New Issue