Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# First, build the application in the `/app` directory.
# TEMPORARY deviation from the rendered template: the pinned
# uv:0.10.12-python3.14-*bookworm*-slim tag does not exist upstream (python
# 3.14 images ship on trixie). Fix pending in python-copier-template; the
# next backend sync will carry it and this local patch disappears.
FROM ghcr.io/astral-sh/uv:0.10.12-python3.14-trixie-slim AS builder
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy

Expand All @@ -26,10 +22,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \


# Then, use a final image without uv
# TEMPORARY: trixie to match the builder image above (see note there).
FROM python:3.14-slim-trixie
# It is important to use the image that matches the builder, as the path to the
# Python executable must be the same, e.g., using `python:3.11-slim-bookworm`
# Python executable must be the same, e.g., using `python:3.11-slim-trixie`
# will fail.

# Copy the application from the builder
Expand Down
9 changes: 6 additions & 3 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.ONESHELL:
.PHONY: install hooks hooks-update ruff ty test test-api docker build run debug attach push
.PHONY: install hooks hooks-update ruff ty test test-api docker build run logs debug attach push

SHELL=/bin/bash
DOCKER_IMG_NAME=ghcr.io/komorebi-ai/react-template
DOCKER_CONTAINER=react-template
DOCKER_IMG_NAME=ghcr.io/komorebi-ai/react-fastapi-template
DOCKER_CONTAINER=react-fastapi-template
GH_USER=GITHUB_USERNAME
GH_TOKEN_FILE=GITHUB_TOKEN_PATH
RUN=uv run
Expand Down Expand Up @@ -50,6 +50,9 @@ run:
[ "$$(docker ps -a | grep $(DOCKER_CONTAINER))" ] && docker stop $(DOCKER_CONTAINER) && docker rm $(DOCKER_CONTAINER)
docker run -d --restart=unless-stopped --name $(DOCKER_CONTAINER) -p 7000:80 $(DOCKER_IMG_NAME)

logs:
docker logs $(DOCKER_CONTAINER)

debug:
docker run -it $(DOCKER_IMG_NAME) /bin/bash

Expand Down
4 changes: 2 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# React Template Backend

![testing workflow](https://github.com/Komorebi-AI/react-template/actions/workflows/pytest.yml/badge.svg)
![testing workflow](https://github.com/Komorebi-AI/react-fastapi-template/actions/workflows/pytest.yml/badge.svg)
[![prek](https://img.shields.io/badge/prek-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/j178/prek)

FastAPI backend for react-template
FastAPI backend for react-fastapi-template

## Structure

Expand Down
11 changes: 5 additions & 6 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.14,<3.15"
name = "app"
# La versión se obtiene automáticamente de git con `setuptools_scm`
#version = "0.1.0"
description = "FastAPI backend for react-template"
description = "FastAPI backend for react-fastapi-template"
readme = "README.md"
authors = [{ name = "Komorebi AI", email = "info@komorebi.ai" }]
dynamic = ["version"]
Expand All @@ -16,21 +16,20 @@ dependencies = [
"pydantic",
"uvicorn",
"colorlog>=6.9.0",
# TEMPORARY deviation from the rendered template: uvicorn needs PyYAML to
# load log_conf.yaml (--log-config). Fix pending in python-copier-template.
# uvicorn needs pyyaml to load the YAML log config (log_conf.yaml)
"pyyaml",
]

[project.urls]
homepage = "https://github.com/Komorebi-AI/react-template"
homepage = "https://github.com/Komorebi-AI/react-fastapi-template"



[tool.setuptools]
packages = ["app"]

[tool.setuptools_scm]
# Backend lives in a subdirectory of the react-template repo; version comes
# Backend lives in a subdirectory of the react-fastapi-template repo; version comes
# from the repo root git metadata (applied by the template sync job)
root = ".."
# Importante crear esta sección vacia para activar el plugin
Expand Down Expand Up @@ -116,7 +115,7 @@ filterwarnings = ["error", "ignore::DeprecationWarning"]

[tool.deptry]
# colorlog is used in log_conf.yaml (not scanned by deptry); pyyaml is used
# by uvicorn to load log_conf.yaml (TEMPORARY, see dependencies above)
# by uvicorn to load log_conf.yaml
per_rule_ignores = {"DEP002" = ["colorlog", "pyyaml"]}

[tool.ty.terminal]
Expand Down
48 changes: 24 additions & 24 deletions backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.