Skip to content

Commit 639d6ab

Browse files
committed
feat: add devcontainer and dependabot configuration, update Dockerfile structure
1 parent a9127dc commit 639d6ab

4 files changed

Lines changed: 67 additions & 5 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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/alpine
3+
{
4+
"name": "RAG Chat API",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
// "image": "mcr.microsoft.com/devcontainers/base:alpine-3.20",
7+
"build": {
8+
// Use the Dockerfile at the root of the repository.
9+
"dockerfile": "../Dockerfile.dev",
10+
// Use docker-compose.yml at the root of the repository.
11+
// "dockerComposeFile": "docker-compose.yml",
12+
// Use a custom build context. More info: https://aka.ms/devcontainer-build-context
13+
"context": ".."
14+
},
15+
"customizations": {
16+
"vscode": {
17+
// Add the IDs of extensions you want installed when the container is created.
18+
"extensions": [
19+
"ms-python.python",
20+
"ms-python.vscode-pylance",
21+
"github.copilot",
22+
"github.copilot-chat",
23+
"ms-toolsai.jupyter",
24+
"ms-toolsai.jupyter-keymap",
25+
"ms-toolsai.jupyter-renderers",
26+
"ms-toolsai.jupyter-cell-tags"
27+
]
28+
}
29+
},
30+
// Features to add to the dev container. More info: https://containers.dev/features.
31+
// "features": {},
32+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
33+
"forwardPorts": [
34+
80,
35+
8000
36+
],
37+
"workspaceFolder": "/workspace",
38+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
39+
// Use 'postCreateCommand' to run commands after the container is created.
40+
// "postCreateCommand": "uname -a",
41+
// Configure tool-specific properties.
42+
// "customizations": {},
43+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
44+
// "remoteUser": "root"
45+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

Dockerfile.bak

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.12-slim
22

3-
WORKDIR /app
3+
WORKDIR /workspace
44

55
# Set environment variables
66
ENV APP_NAME=rag_chat_api
@@ -23,10 +23,7 @@ COPY requirements.txt .
2323
RUN pip install --no-cache-dir -r requirements.txt
2424

2525
# Copy pre-built ChromaDB (if it exists locally)
26-
COPY db/chroma /app/db/chroma
27-
28-
# Set proper permissions for the ChromaDB
29-
RUN chmod -R 755 /app/db/chroma
26+
COPY db/chroma /workspace/db/chroma
3027

3128
# Copy configuration files
3229
COPY .env.prod ./.env.prod

Dockerfile.dev

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM python:3.12-slim
2+
3+
WORKDIR /workspace
4+
5+
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
build-essential \
7+
libmagic1 \
8+
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)