feat(Env): Ajusta a conexão do firebird para variavel de ambiente - 15:36
This commit is contained in:
parent
c7cfb05b4d
commit
5d5e8eb755
2 changed files with 3 additions and 6 deletions
|
|
@ -30,9 +30,6 @@ COPY --from=builder /install /usr/local
|
|||
# Copia todo o código do projeto
|
||||
COPY . .
|
||||
|
||||
# Garante que o diretório de configuração exista
|
||||
RUN mkdir -p /app/config/database
|
||||
|
||||
# Define timezone e variáveis de ambiente padrão
|
||||
ENV TZ=America/Sao_Paulo \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ class Config:
|
|||
base_dir = Path(__file__).resolve().parent
|
||||
|
||||
# Caminho absoluto para o config.json (subindo dois níveis e entrando em config/)
|
||||
config_path = base_dir.parent.parent / 'config' / name
|
||||
config_path = base_dir.parent.parent / "config" / name
|
||||
|
||||
# Carrega o JSON como objeto acessível por ponto
|
||||
with open(config_path, 'r') as f:
|
||||
with open(config_path, "r") as f:
|
||||
config = json.load(f, object_hook=lambda d: SimpleNamespace(**d))
|
||||
|
||||
return config
|
||||
return config
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue