Get the env loading right for gitea

This commit is contained in:
Luke Murphy 2020-07-02 14:50:23 +02:00
parent 6b0e9bf966
commit eadb17d8c1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -104,10 +104,14 @@ def stack_deploy(app_name, stack_name, env):
def get_loaded_env(app_name, request_form): def get_loaded_env(app_name, request_form):
"""Load environment from install form for compose.yml injection.""" """Load environment from install form for compose.yml injection."""
environment = environ.copy() env = environ.copy()
for key in request_form.keys(): for key in request_form.keys():
environment[key.upper()] = request.form[key] env[key.upper()] = request.form[key]
return environment
env["LETS_ENCRYPT_ENV"] = "staging"
return env
class GiteaInstallForm(FlaskForm): class GiteaInstallForm(FlaskForm):
@ -136,7 +140,7 @@ class GiteaInstallForm(FlaskForm):
secret_key = PasswordField( secret_key = PasswordField(
"Secret key", validators=[DataRequired(), Length(min=64)], "Secret key", validators=[DataRequired(), Length(min=64)],
) )
ssh_port = StringField("SSH port", default="2222") ssh_host_port = StringField("SSH host port", default="2225")
@app.route("/") @app.route("/")