File tree Expand file tree Collapse file tree 6 files changed +57
-69
lines changed
Expand file tree Collapse file tree 6 files changed +57
-69
lines changed Original file line number Diff line number Diff line change 1- - [ Projects] ( docs/projects.md )
2- - [ Pre-commit] ( docs/pre-commit.md )
1+ # Overview
2+
3+ Python monorepo + uv + Vertical Slice Architecture
4+
5+ # Projects
6+
7+ ## API
8+
9+ RESTful API.
10+
11+ ``` bash
12+ uv run -- fastapi dev api/src/api/main.py
13+ ```
14+
15+ ``` bash
16+ docker build \
17+ --file api/src/api/Dockerfile \
18+ --tag python-monorepo:0.1.0 \
19+ --platform=linux/amd64 \
20+ .
21+ ```
22+
23+ ``` bash
24+ docker run \
25+ --publish 8000:8000 \
26+ --env COMMON__ENVIRONMENT=Development \
27+ python-monorepo:0.1.0
28+ ```
29+
30+ # Transcriber
31+
32+ Audio transcriber reading from a queue.
Original file line number Diff line number Diff line change 1+ # 0.7.3-python3.12-bookworm-slim
2+ FROM ghcr.io/astral-sh/uv@sha256:bccff1a52988d078ce51ca71fa42c02bd321eaef7ed1c4d801dad9ac8552e3a5 AS builder
3+
4+ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy UV_PYTHON_DOWNLOADS=0
5+
6+ WORKDIR /app
7+ COPY pyproject.toml uv.lock ./
8+ COPY api api
9+ COPY domain domain
10+ RUN --mount=type=cache,target=/root/.cache/uv \
11+ uv sync --frozen --no-dev
12+
13+ # 3.12.10-slim-bookworm
14+ FROM python@sha256:31a416db24bd8ade7dac5fd5999ba6c234d7fa79d4add8781e95f41b187f4c9a AS final
15+
16+ ENV COMMON__ENVIRONMENT=""
17+
18+ RUN adduser --system --no-create-home nonroot
19+ COPY --from=builder --chown=nonroot /app /app
20+ WORKDIR /app
21+ EXPOSE 8000
22+ USER nonroot
23+ CMD [".venv/bin/fastapi" , "run" , "api/src/api/main.py" ]
24+
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11{
2- "cells" : [
3- {
4- "cell_type" : " code" ,
5- "execution_count" : 1 ,
6- "metadata" : {},
7- "outputs" : [],
8- "source" : [
9- " from domain.domain_printer import DomainPrinter"
10- ]
11- },
12- {
13- "cell_type" : " code" ,
14- "execution_count" : 2 ,
15- "metadata" : {},
16- "outputs" : [
17- {
18- "name" : " stdout" ,
19- "output_type" : " stream" ,
20- "text" : [
21- " Domain printer\n "
22- ]
23- }
24- ],
25- "source" : [
26- " DomainPrinter().print()"
27- ]
28- },
29- {
30- "cell_type" : " code" ,
31- "execution_count" : 1 ,
32- "metadata" : {},
33- "outputs" : [
34- {
35- "name" : " stdout" ,
36- "output_type" : " stream" ,
37- "text" : [
38- " Transcriber printer\n "
39- ]
40- }
41- ],
42- "source" : [
43- " from transcriber.transcriber_printer import TranscriberPrinter\n " ,
44- " \n " ,
45- " TranscriberPrinter().print()"
46- ]
47- }
48- ],
2+ "cells" : [],
493 "metadata" : {
504 "kernelspec" : {
515 "display_name" : " .venv" ,
You can’t perform that action at this time.
0 commit comments