uv run fastapi dev main.py
curl
(why does this suck?)
https://www.docker.com/resources/what-container/
Dockerfiles
https://docs.docker.com/get-started/docker-concepts/building-images/understanding-image-layers
# FROM is used to pick a base image to start from# Alpine is a lightweight linux distroFROM alpine:3.22# Install uv# COPY can be used to copy files from an existing image on the internet (from a "hub")COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/# Set work directory, this effectively sets the root path for any subsequent commandsWORKDIR /app# COPY can also copy files from our local machine to the imageCOPY services/auth/. ./# RUN is used to run a command directly on the imageRUN uv sync --no-cache --link-mode=copy# CMD is used to set a command when running a container spawned from this image# This is not required and can be set at runtimeCMD ["uv", "run", "fastapi", "dev", "main.py", "-p", "8000"]
# services/auth/app/config.pyclass Settings: database_url: str = "sqlite:///../../jarvis.db" jwt_secret_key: str = "super-secret-key-dont-use-this-in-production" jwt_algorithm: str = "HS256" access_token_expire_minutes: int = 30 refresh_token_expire_days: int = 30 cookie_secure: bool = True cookie_samesite: str = "None"settings = Settings()
Why does this suck?