Skip to content

Commit

Permalink
feat: Update docker-compose and app configuration
Browse files Browse the repository at this point in the history
- Updated the `docker-compose.yaml` file to use environment variables with a new prefix for dynamic configuration.
- Modified the `app.py` file to change the title of the FastAPI application.

This commit improves the configuration and naming conventions in the project.
  • Loading branch information
SakuraIsayeki committed Jul 19, 2023
1 parent 1c03fae commit fa5668a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
10 changes: 5 additions & 5 deletions wowskarma_api_minimap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,23 @@ shell: ## Open a shell in the project.

.PHONY: docker-build
docker-build: ## Builder docker images
@docker-compose -f docker-compose-dev.yaml -p wowskarma_api_minimap build
@docker-compose -f docker-compose.yaml -p wowskarma_api_minimap build

.PHONY: docker-run
docker-run: ## Run docker development images
@docker-compose -f docker-compose-dev.yaml -p wowskarma_api_minimap up -d
@docker-compose -f docker-compose.yaml -p wowskarma_api_minimap up -d

.PHONY: docker-stop
docker-stop: ## Bring down docker dev environment
@docker-compose -f docker-compose-dev.yaml -p wowskarma_api_minimap down
@docker-compose -f docker-compose.yaml -p wowskarma_api_minimap down

.PHONY: docker-ps
docker-ps: ## Bring down docker dev environment
@docker-compose -f docker-compose-dev.yaml -p wowskarma_api_minimap ps
@docker-compose -f docker-compose.yaml -p wowskarma_api_minimap ps

.PHONY: docker-log
docker-logs: ## Bring down docker dev environment
@docker-compose -f docker-compose-dev.yaml -p wowskarma_api_minimap logs -f app
@docker-compose -f docker-compose.yaml -p wowskarma_api_minimap logs -f app

# This project has been generated from rochacbruno/fastapi-project-template
# __author__ = 'rochacbruno'
Expand Down
6 changes: 4 additions & 2 deletions wowskarma_api_minimap/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ services:
ports:
- "8000:8000"
environment:
- wowskarma_api_minimap_DB__uri=postgresql://postgres:postgres@db:5432/wowskarma_api_minimap_dev
- wowskarma_api_minimap_DB__connect_args={}
- ENVVAR_PREFIX_FOR_DYNACONF=WOWSKARMA_API_MINIMAP
- WOWSKARMA_API_MINIMAP_ENV=development
- WOWSKARMA_API_MINIMAP_DB__URI=postgresql://postgres:postgres@db:5432/wowskarma_api_minimap_dev
- WOWSKARMA_API_MINIMAP_DB__CONNECT_ARGS={}
volumes:
- .:/home/app/web
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion wowskarma_api_minimap/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
site_name: wowskarma_api_minimap
site_name: WOWS Karma - Minimap API
theme: readthedocs
6 changes: 5 additions & 1 deletion wowskarma_api_minimap/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ def read_requirements(path):
author="SakuraIsayeki",
packages=find_packages(exclude=["tests", ".github"]),
install_requires=read_requirements("requirements.txt"),
entry_points={"console_scripts": ["wowskarma_api_minimap = src.__main__:main"]},
entry_points={
"console_scripts": [
"wowskarma_api_minimap = wowskarma_api_minimap.__main__:main"
]
},
)
4 changes: 2 additions & 2 deletions wowskarma_api_minimap/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def read(*paths, **kwargs):


description = """
src API helps you do awesome stuff. 🚀
Standalone Minimap rendering microservice to render World of Warships replays.
"""

app = FastAPI(
title="wowskarma_api_minimap",
title="WOWS Karma - Minimap API",
description=description,
version=read("VERSION"),
contact={
Expand Down

0 comments on commit fa5668a

Please sign in to comment.