Skip to content

Commit

Permalink
Make api resilient to lack o TAG_NAME env var
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-herrmann committed Apr 4, 2024
1 parent a651174 commit e5a6d4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ services:
volumes:
- ./:/api-pgd
environment:
TAG_NAME: dev
# version number
# TAG_NAME: 2.x.x
ALGORITHM: HS256
API_PGD_ADMIN_USER: johndoe@oi.com
API_PGD_ADMIN_PASSWORD: secret
Expand Down
2 changes: 1 addition & 1 deletion src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
app = FastAPI(
title="Plataforma de recebimento de dados do Programa de Gestão - PGD",
description=description,
version=os.environ["TAG_NAME"],
version=os.getenv("TAG_NAME", "dev-build") or "dev-build",
)


Expand Down

0 comments on commit e5a6d4b

Please sign in to comment.