diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ebcc20..35ab769 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,8 +3,13 @@ name: Build on: push: + branches: ["**"] + paths-ignore: + - "**.md" pull_request: branches: [main] + paths-ignore: + - "**.md" workflow_dispatch: workflow_call: diff --git a/Dockerfile b/Dockerfile index a2c2bc5..e131cbf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # build stage -FROM docker.io/library/python:3.14-slim as build +FROM docker.io/library/python:3.14-slim AS build ARG REVISION WORKDIR /opt/app ENV SETUPTOOLS_SCM_PRETEND_VERSION=${REVISION} \ @@ -20,9 +20,9 @@ FROM docker.io/library/python:3.14-slim ARG REVISION LABEL org.opencontainers.image.title="FastAPI Template" LABEL org.opencontainers.image.description="FastAPI Template" -LABEL org.opencontainers.image.source="https://github.com/zbhavyai/fastapi-template" +LABEL org.opencontainers.image.source="https://github.com/devscompass/fastapi-template" LABEL org.opencontainers.image.licenses="MIT" -LABEL org.opencontainers.image.authors="Bhavyai Gupta " +LABEL org.opencontainers.image.authors="Devs Compass" LABEL org.opencontainers.image.version="${REVISION}" WORKDIR /opt/app ENV SETUPTOOLS_SCM_PRETEND_VERSION=${REVISION} \ diff --git a/LICENSE b/LICENSE index f8970b3..f5ffc85 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Bhavyai Gupta +Copyright (c) 2026 Devs Compass Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 712ac8d..0ff7216 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,46 @@ # FastAPI Template -![Build](https://img.shields.io/github/actions/workflow/status/zbhavyai/fastapi-template/build.yml?label=Build) -![Release](https://img.shields.io/github/actions/workflow/status/zbhavyai/fastapi-template/release.yml?label=Release) -![License](https://img.shields.io/github/license/zbhavyai/fastapi-template?label=License) +[![Build](https://img.shields.io/github/actions/workflow/status/devscompass/fastapi-template/build.yml?label=Build)](https://github.com/devscompass/fastapi-template/actions/workflows/build.yml) +[![Release](https://img.shields.io/github/actions/workflow/status/devscompass/fastapi-template/release.yml?label=Release)](https://github.com/devscompass/fastapi-template/actions/workflows/release.yml) +[![License](https://img.shields.io/github/license/devscompass/fastapi-template?label=License)](https://github.com/devscompass/fastapi-template/blob/main/LICENSE) A **starter template** for building backend applications with [FastAPI](https://fastapi.tiangolo.com/), the high-performance Python web framework. ## :sparkles: Tech Stack and Features -- :zap: [FastAPI](http://fastapi.tiangolo.com/), the high-performance Python web framework -- :jigsaw: [Pydantic](https://docs.pydantic.dev/) for data validation and settings management -- :gear: [SQLAlchemy](https://www.sqlalchemy.org/) and [asyncpg](https://github.com/MagicStack/asyncpg) for non-blocking database access -- :elephant: [PostgreSQL](https://www.postgresql.org/) as the production-ready relational database -- :luggage: [Alembic](https://alembic.sqlalchemy.org/) for version-controlled database migrations -- :open_file_folder: Defined project structure with ready-to-use [`pyproject.toml`](pyproject.toml) and [pydantic settings](app/core/settings.py) -- :pen: [VS Code](https://code.visualstudio.com/) settings included -- :art: [Ruff](https://docs.astral.sh/ruff/) for consistent code formatting and linting -- :page_facing_up: [.editorconfig](https://editorconfig.org/) for consistent coding styles across editors -- :broom: A `pre-commit` hook for style enforcement -- :test_tube: [pytest](https://docs.pytest.org/en/stable/) tests to keep code honest -- :whale: Containerization with Dockerfile and docker compose -- :otter: Automatic [Podman](https://podman.io/)/[Docker](https://www.docker.com/) detection for local dev -- :hammer_and_wrench: [Makefile](https://www.gnu.org/software/make/) targets for format, build, run, and container tasks -- :vertical_traffic_light: [GitHub Actions](https://github.com/features/actions) for CI/CD -- :label: Artifact versioning based on Git SHA or tag, both in CI/CD and local builds -- :robot: [Dependabot](https://github.com/dependabot) for automated dependency updates +- :zap: [FastAPI](http://fastapi.tiangolo.com/), the high-performance Python web framework +- :jigsaw: [Pydantic](https://docs.pydantic.dev/) for data validation and settings management +- :gear: [SQLAlchemy](https://www.sqlalchemy.org/) and [asyncpg](https://github.com/MagicStack/asyncpg) for non-blocking database access +- :elephant: [PostgreSQL](https://www.postgresql.org/) as the production-ready relational database +- :luggage: [Alembic](https://alembic.sqlalchemy.org/) for version-controlled database migrations +- :open_file_folder: Defined project structure with ready-to-use [`pyproject.toml`](pyproject.toml) and [pydantic settings](app/core/settings.py) +- :pen: [VS Code](https://code.visualstudio.com/) settings included +- :art: [Ruff](https://docs.astral.sh/ruff/) for consistent code formatting and linting +- :page_facing_up: [.editorconfig](https://editorconfig.org/) for consistent coding styles across editors +- :broom: A `pre-commit` hook for style enforcement +- :test_tube: [pytest](https://docs.pytest.org/en/stable/) tests to keep code honest +- :whale: Containerization with Dockerfile and docker compose +- :otter: Automatic [Podman](https://podman.io/)/[Docker](https://www.docker.com/) detection for local dev +- :hammer_and_wrench: [Makefile](https://www.gnu.org/software/make/) targets for format, build, run, and container tasks +- :vertical_traffic_light: [GitHub Actions](https://github.com/features/actions) for CI/CD +- :label: Artifact versioning based on Git SHA or tag, both in CI/CD and local builds +- :robot: [Dependabot](https://github.com/dependabot) for automated dependency updates ## :rocket: Getting started -- Before you start development on this project, run the `init` target. This will install a pre-commit hook and install dependencies. +- Before you start development on this project, run the `init` target. This will install a pre-commit hook and install dependencies. ```shell make init ``` -- Run the application in dev mode that enables live coding. +- Run the application in dev mode that enables live coding. ```shell make dev ``` -- To format the code while developing, you may use for IDE and turn on the auto-formatting on save. You may also use the format target. +- To format the code while developing, you may use for IDE and turn on the auto-formatting on save. You may also use the format target. ```shell make format @@ -58,7 +58,7 @@ A **starter template** for building backend applications with [FastAPI](https:// make container-build ``` -1. Run the application +2. Run the application ```shell make run diff --git a/tests/conftest.py b/tests/conftest.py index 9e16f36..2edff52 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -25,7 +25,7 @@ @pytest.fixture(scope="session") def postgres_container() -> Generator[PostgresContainer]: container = PostgresContainer( - "docker.io/library/postgres:17.0", + "docker.io/library/postgres:18", username="appuser", password="apppass", dbname="appdb",