Namespaces: =: io.murano.apps.docker std: io.murano Name: DockerNginx Extends: DockerApplication Properties: name: Contract: $.string().notNull() publish: Contract: $.bool().notNull() Default: true Methods: initialize: Body: - $._environment: $.find(std:Environment).require() - $._scope: switch($.publish, $ => public, not $ => internal) getContainer: Body: Return: name: $.name image: nginx ports: - port: 80 scope: $._scope onInstallationStart: Body: - $._environment.reporter.report($this, 'Installing Nginx') onInstallationFinish: Body: - If: $.publish Then: - $endpoints: $.applicationEndpoints.where($.scope = $this._scope). select(format('http://{0}:{1}', $.address, $.port)) - $._environment.reporter.report($this, 'Nginx {0} is available at {1}'.format($.name, join(', ', $endpoints))) Else: - $._environment.reporter.report($this, 'Nginx {0} has deployed but is not accessible from outside'.format($.name))