-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from grillazz/179-reflect-latest-and-greatest…
…-fastapi-improvements 179 reflect latest and greatest fastapi improvements
- Loading branch information
Showing
6 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
services: | ||
app: | ||
container_name: fsap_app | ||
build: . | ||
env_file: | ||
- .env | ||
- .secrets | ||
command: bash -c " | ||
uvicorn app.main:app | ||
--log-config ./logging-uvicorn.json | ||
--host 0.0.0.0 --port 8080 | ||
--lifespan=on --use-colors --loop uvloop --http httptools | ||
--reload --log-level debug | ||
" | ||
volumes: | ||
- .:/home/code | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- db | ||
- valkey | ||
|
||
db: | ||
container_name: fsap_db | ||
build: | ||
context: ./db | ||
dockerfile: Dockerfile | ||
volumes: | ||
- fastapi_postgres_data:/var/lib/postgresql/data | ||
env_file: | ||
- .env | ||
ports: | ||
- 5432:5432 | ||
environment: | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} | ||
- POSTGRES_USER=${POSTGRES_USER?Variable not set} | ||
- POSTGRES_DB=${POSTGRES_DB?Variable not set} | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD-SHELL", "pg_isready -d $POSTGRES_DB -U $POSTGRES_USER" | ||
] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
|
||
inmemory: | ||
image: valkey/valkey:latest | ||
container_name: fsap_inmemory | ||
ports: | ||
- "6379:6379" | ||
env_file: | ||
- .env | ||
entrypoint: valkey-server --loglevel verbose | ||
|
||
volumes: | ||
fastapi_postgres_data: {} |