Fixes Storage Service Integration
This commit is contained in:
19
setup.py
19
setup.py
@@ -5,7 +5,6 @@ from pathlib import Path, PosixPath
|
||||
import argparse
|
||||
import os
|
||||
|
||||
|
||||
ENV_VARIABLES = [
|
||||
"FRONTEND_PATH",
|
||||
"BACKEND_URL",
|
||||
@@ -35,7 +34,6 @@ ENV_VARIABLES = [
|
||||
"AWS_BUCKET_NAME",
|
||||
]
|
||||
|
||||
|
||||
FORCE_BASE64_FIELD = [
|
||||
"OAUTH_GITHUB_CLIENT_ID",
|
||||
"OAUTH_GITHUB_CLIENT_SECRET",
|
||||
@@ -67,17 +65,14 @@ def setting_environment(environment: str):
|
||||
|
||||
match environment:
|
||||
case "staging":
|
||||
DOMAIN="staging.hideyoshi.com.br"
|
||||
API_DOMAIN="api.staging.hideyoshi.com.br"
|
||||
STORAGE_API_DOMAIN="storage.staging.hideyoshi.com.br"
|
||||
DOMAIN = "staging.hideyoshi.com.br"
|
||||
API_DOMAIN = "api.staging.hideyoshi.com.br"
|
||||
case _:
|
||||
DOMAIN="hideyoshi.com.br"
|
||||
API_DOMAIN="api.hideyoshi.com.br"
|
||||
STORAGE_API_DOMAIN="storage.hideyoshi.com.br"
|
||||
DOMAIN = "hideyoshi.com.br"
|
||||
API_DOMAIN = "api.hideyoshi.com.br"
|
||||
|
||||
os.environ["DOMAIN"] = DOMAIN
|
||||
os.environ["API_DOMAIN"] = API_DOMAIN
|
||||
os.environ["STORAGE_API_DOMAIN"] = STORAGE_API_DOMAIN
|
||||
|
||||
|
||||
def load_secret_file(file: str):
|
||||
@@ -102,8 +97,8 @@ def envsubst_file(file: PosixPath):
|
||||
with open(file) as f:
|
||||
formated_file = envsubst(f.read())
|
||||
|
||||
new_file = Path("deployment")\
|
||||
.joinpath(*[part.split('.')[0] for part in file.parts if part != "template"])\
|
||||
new_file = Path("deployment") \
|
||||
.joinpath(*[part.split('.')[0] for part in file.parts if part != "template"]) \
|
||||
.with_suffix(".yaml")
|
||||
|
||||
with open(new_file, 'w') as f:
|
||||
@@ -143,4 +138,4 @@ if __name__ == "__main__":
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
main(**vars(args))
|
||||
main(**vars(args))
|
||||
|
||||
Reference in New Issue
Block a user