Skip to content

Commit 9f91111

Browse files
authored
Merge pull request #1 from NicholasGoh/feat/development-environment
Feat/development environment
2 parents 26af12a + 93ae72b commit 9f91111

8 files changed

Lines changed: 1623 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "API Development Container",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"dockerComposeFile": [
7+
"../compose-dev.yaml"
8+
],
9+
"service": "backend",
10+
"workspaceFolder": "/app",
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"IronGeek.vscode-env",
15+
"cweijan.vscode-redis-client",
16+
"emeraldwalk.RunOnSave",
17+
"mohamed-nouri.websocket-client",
18+
"ms-azuretools.vscode-docker",
19+
"usernamehw.errorlens",
20+
"Gruntfuggly.todo-tree",
21+
"ms-python.black-formatter",
22+
"ms-python.debugpy",
23+
"ms-python.isort",
24+
"ms-python.python"
25+
],
26+
"settings": {
27+
"files.exclude": {
28+
"**/.venv": true
29+
},
30+
"workbench.colorCustomizations": {
31+
"editorUnnecessaryCode.border": "#ff0000"
32+
},
33+
"explorer.confirmDelete": false,
34+
"editor.cursorBlinking": "expand",
35+
"editor.cursorSmoothCaretAnimation": "on",
36+
"todo-tree.highlights.enabled": false,
37+
"window.density.editorTabHeight": "compact",
38+
"workbench.activityBar.location": "top",
39+
"editor.formatOnSave": true,
40+
"files.insertFinalNewline": true,
41+
"files.trimFinalNewlines": true,
42+
"[python]": {
43+
"editor.formatOnSave": true,
44+
"editor.codeActionsOnSave": {
45+
"source.organizeImports": "always",
46+
"source.unusedImports": "always"
47+
}
48+
},
49+
"editor.rulers": [
50+
{
51+
"column": 80,
52+
"color": "#303030"
53+
},
54+
{
55+
"column": 72,
56+
"color": "#242424"
57+
}
58+
],
59+
"black-formatter.args": [
60+
"--line-length=80"
61+
],
62+
"emeraldwalk.runonsave": {
63+
"commands": [
64+
{
65+
"match": "((packages)|(requirements))\\.txt",
66+
"isAsync": true,
67+
"cmd": "sort -o ${file} ${file}"
68+
}
69+
]
70+
},
71+
"python.analysis.autoImportCompletions": true
72+
}
73+
}
74+
}
75+
}

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

backend/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
2+
3+
RUN apt update && apt install --no-install-recommends -y curl
4+
WORKDIR /app
5+
COPY ./uv.lock ./pyproject.toml .
6+
RUN uv sync --frozen

backend/pyproject.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[project]
2+
name = "app"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = [
8+
"bs4==0.0.2",
9+
"faker==30.8.1",
10+
"fastapi[standard]==0.115.11",
11+
"langchain==0.3.6",
12+
"langchain-community==0.3.4",
13+
"langchain-openai==0.2.3",
14+
"langchain-postgres==0.0.12",
15+
"langfuse==2.60.2",
16+
"langgraph==0.2.39",
17+
"prometheus-client==0.21.1",
18+
"psycopg[binary]==3.2.3",
19+
"pydantic-settings==2.6.0",
20+
"pypdf==5.1.0",
21+
"rich==13.9.4",
22+
"sse-starlette==2.1.3",
23+
]

backend/requirements.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Faker==30.8.1
2+
bs4==0.0.2
3+
fastapi[standard]==0.115.11
4+
langchain-community==0.3.4
5+
langchain-openai==0.2.3
6+
langchain-postgres==0.0.12
7+
langchain==0.3.6
8+
langfuse==2.60.2
9+
langgraph==0.2.39
10+
prometheus_client==0.21.1
11+
psycopg[binary]==3.2.3
12+
pydantic-settings==2.6.0
13+
pypdf==5.1.0
14+
rich==13.9.4
15+
sse-starlette==2.1.3

backend/uv.lock

Lines changed: 1493 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compose-dev.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
services:
2+
backend:
3+
image: backend:dev
4+
build:
5+
context: ./backend
6+
entrypoint: bash -c "sleep infinity"
7+
env_file:
8+
- ./envs/backend.env
9+
volumes:
10+
- ./backend:/app

envs/backend.env

Whitespace-only changes.

0 commit comments

Comments
 (0)