-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
532 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
services: | ||
web: | ||
# Build the image from the Dockerfile in the current directory | ||
build: . | ||
|
||
# Host the FastAPI application on port 8000 | ||
ports: | ||
- "8000:8000" | ||
|
||
develop: | ||
# Create a `watch` configuration to update the appl | ||
# https://docs.docker.com/compose/file-watch/#compose-watch-versus-bind-mounts | ||
watch: | ||
# Sync the working directory with the `/app` directory in the container | ||
- action: sync | ||
path: . | ||
target: /app | ||
# Exclude the project virtual environment — it could be for a | ||
# different platform in the container | ||
ignore: | ||
- .venv/ | ||
|
||
# Rebuild the image on changes to the `pyproject.toml` | ||
- action: rebuild | ||
path: ./pyproject.toml |
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 |
---|---|---|
@@ -1,2 +1,12 @@ | ||
from fastapi import FastAPI | ||
|
||
app = FastAPI() | ||
|
||
|
||
def hello() -> str: | ||
print("Hello from uv-docker-example!") | ||
print("Hello world") | ||
|
||
|
||
@app.get("/") | ||
async def root(): | ||
return "Hello world" |
Oops, something went wrong.