Switching over to using unix sockets for ICP
This commit is contained in:
@@ -38,9 +38,9 @@ caddy_sites_enabled_dir: "/etc/caddy/sites-enabled"
|
||||
# Database Configuration (Self-Contained)
|
||||
# =================================================================
|
||||
|
||||
# Gitea manages its own database
|
||||
# Gitea manages its own database (Unix socket connection)
|
||||
gitea_db_type: "postgres"
|
||||
gitea_db_host: "127.0.0.1"
|
||||
gitea_db_host: "/run/postgresql" # Unix socket directory
|
||||
gitea_db_port: 5432
|
||||
gitea_db_name: "gitea"
|
||||
gitea_db_user: "gitea"
|
||||
|
||||
@@ -24,7 +24,13 @@ APP_DATA_PATH = {{ gitea_home }}/data
|
||||
|
||||
[database]
|
||||
DB_TYPE = {{ gitea_db_type }}
|
||||
{% if gitea_db_host.startswith('/') %}
|
||||
# Unix socket connection
|
||||
HOST = {{ gitea_db_host }}
|
||||
{% else %}
|
||||
# TCP connection
|
||||
HOST = {{ gitea_db_host }}:{{ gitea_db_port }}
|
||||
{% endif %}
|
||||
NAME = {{ gitea_db_name }}
|
||||
USER = {{ gitea_db_user }}
|
||||
PASSWD = {{ gitea_db_password }}
|
||||
|
||||
Reference in New Issue
Block a user