mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[REM] runbot: remove non nginx support
Some non tested code was making running build available without an nginx config (using port and local address instead of using a proper dns/nginx config). Removing this part to reduce complexity.
This commit is contained in:
parent
02cbc0d090
commit
272096b810
@ -387,14 +387,8 @@ class BuildResult(models.Model):
|
|||||||
|
|
||||||
@api.depends('port', 'dest', 'host')
|
@api.depends('port', 'dest', 'host')
|
||||||
def _compute_domain(self):
|
def _compute_domain(self):
|
||||||
icp = self.env['ir.config_parameter'].sudo()
|
|
||||||
nginx = icp.get_param('runbot.runbot_nginx', False) # or just force nginx?
|
|
||||||
domain = icp.get_param('runbot.runbot_domain', fqdn())
|
|
||||||
for build in self:
|
for build in self:
|
||||||
if nginx:
|
build.domain = "%s.%s" % (build.dest, build.host)
|
||||||
build.domain = "%s.%s" % (build.dest, build.host)
|
|
||||||
else:
|
|
||||||
build.domain = "%s:%s" % (domain, build.port)
|
|
||||||
|
|
||||||
@api.depends_context('batch')
|
@api.depends_context('batch')
|
||||||
def _compute_build_url(self):
|
def _compute_build_url(self):
|
||||||
|
@ -345,15 +345,12 @@ class ConfigStep(models.Model):
|
|||||||
cmd += ['-d', '%s-%s' % (build.dest, db_name)]
|
cmd += ['-d', '%s-%s' % (build.dest, db_name)]
|
||||||
|
|
||||||
icp = self.env['ir.config_parameter'].sudo()
|
icp = self.env['ir.config_parameter'].sudo()
|
||||||
nginx = icp.get_param('runbot.runbot_nginx', True)
|
if grep(build._server("tools/config.py"), "proxy-mode"):
|
||||||
if grep(build._server("tools/config.py"), "proxy-mode") and nginx:
|
|
||||||
cmd += ["--proxy-mode"]
|
cmd += ["--proxy-mode"]
|
||||||
|
|
||||||
if grep(build._server("tools/config.py"), "db-filter"):
|
if grep(build._server("tools/config.py"), "db-filter"):
|
||||||
if nginx:
|
cmd += ['--db-filter', '%d.*$']
|
||||||
cmd += ['--db-filter', '%d.*$']
|
|
||||||
else:
|
|
||||||
cmd += ['--db-filter', '%s.*$' % build.dest]
|
|
||||||
smtp_host = docker_get_gateway_ip()
|
smtp_host = docker_get_gateway_ip()
|
||||||
if smtp_host:
|
if smtp_host:
|
||||||
cmd += ['--smtp', smtp_host]
|
cmd += ['--smtp', smtp_host]
|
||||||
|
@ -35,7 +35,6 @@ class ResConfigSettings(models.TransientModel):
|
|||||||
|
|
||||||
# TODO other icp
|
# TODO other icp
|
||||||
# runbot.runbot_maxlogs 100
|
# runbot.runbot_maxlogs 100
|
||||||
# runbot.runbot_nginx True
|
|
||||||
# migration db
|
# migration db
|
||||||
# ln path
|
# ln path
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user