gen-config: 'service' replaces several variables.
parent
0f89791a76
commit
86f3294689
|
@ -94,12 +94,7 @@ class GenConfig::Context
|
|||
if service = Service.get_by_id service_id
|
||||
environment = service.environment
|
||||
|
||||
options["id"] = service.full_id
|
||||
options["name"] = service.name
|
||||
options["service_root"] = service.root
|
||||
|
||||
options["environment"] = environment.name
|
||||
options["environment_root"] = environment.root
|
||||
options["service"] = service.to_genconfig
|
||||
|
||||
providers = Hash(String, Variables).new
|
||||
service.providers.each do |token, provider|
|
||||
|
|
|
@ -16,25 +16,25 @@ SECRET_KEY = vPFgSqRMIe7Dzk4frRM4UA3CETedL8agK7x6IQFQt9YfRPiQGhQbYAGfyan71iU
|
|||
[database]
|
||||
DB_TYPE = postgres
|
||||
HOST = 127.0.0.1:{{ port(providers.postgresql) }}
|
||||
NAME = {{ id | replace("/", "_") }}_db
|
||||
USER = {{ id | replace("/", "_") }}
|
||||
PASSWD = {{ random_password( id ) }}
|
||||
NAME = {{ service.id | replace("/", "_") }}_db
|
||||
USER = {{ service.id | replace("/", "_") }}
|
||||
PASSWD = {{ random_password( service.id ) }}
|
||||
SSL_MODE = disable
|
||||
CHARSET = utf8
|
||||
PATH = /srv/{{ environment }}/gitea/data/gitea.db
|
||||
PATH = {{ service.root }}/data/gitea.db
|
||||
|
||||
[repository]
|
||||
ROOT = /srv/{{ environment }}/gitea/repositories
|
||||
ROOT = {{ service.root }}/repositories
|
||||
|
||||
[server]
|
||||
SSH_DOMAIN = localhost
|
||||
DOMAIN = localhost
|
||||
HTTP_PORT = {{ port(id) }}
|
||||
ROOT_URL = http://localhost:{{ port(id) }}/
|
||||
HTTP_PORT = {{ port(service.id) }}
|
||||
ROOT_URL = http://localhost:{{ port(service.id) }}/
|
||||
DISABLE_SSH = false
|
||||
SSH_PORT = 22
|
||||
LFS_START_SERVER = true
|
||||
LFS_CONTENT_PATH = /srv/{{ environment }}/gitea/data/lfs
|
||||
LFS_CONTENT_PATH = {{ service.root }}/data/lfs
|
||||
LFS_JWT_SECRET = nUIANTsStEelCeOo7SFTcJllpJ6I8DXNr7duUgGMXfI
|
||||
OFFLINE_MODE = false
|
||||
|
||||
|
@ -67,6 +67,6 @@ PROVIDER = file
|
|||
[log]
|
||||
MODE = file
|
||||
LEVEL = info
|
||||
ROOT_PATH = /srv/{{ environment }}/gitea/log
|
||||
ROOT_PATH = {{ service.root }}/log
|
||||
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ events {
|
|||
}
|
||||
|
||||
http {
|
||||
error_log /var/log/{{ id | replace("/", "_") }}_error.log warn;
|
||||
access_log /var/log/{{ id | replace("/", "_") }}_access.log;
|
||||
error_log /var/log/{{ service.id | replace("/", "_") }}_error.log warn;
|
||||
access_log /var/log/{{ service.id | replace("/", "_") }}_access.log;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
# comma-separated list of addresses;
|
||||
# defaults to 'localhost'; use '*' for all
|
||||
# (change requires restart)
|
||||
port = {{port(id)}}
|
||||
port = {{port(service.id)}}
|
||||
max_connections = 100 # (change requires restart)
|
||||
#superuser_reserved_connections = 3 # (change requires restart)
|
||||
#unix_socket_directories = '/run/postgresql' # comma-separated list of directories
|
||||
|
@ -687,4 +687,4 @@ default_text_search_config = 'pg_catalog.english'
|
|||
# CUSTOMIZED OPTIONS
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Add settings for extensions here
|
||||
# Add settings for extensions here
|
||||
|
|
Loading…
Reference in New Issue