File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "name" : " deepfake-agentic-ai" ,
3+ "image" : " mcr.microsoft.com/devcontainers/base:ubuntu-22.04" ,
4+ "features" : {
5+ "ghcr.io/devcontainers/features/docker-in-docker:2" : {},
6+ "ghcr.io/devcontainers/features/python:1" : {
7+ "version" : " 3.11"
8+ }
9+ },
10+ "postCreateCommand" : " bash .devcontainer/setup.sh" ,
11+ "forwardPorts" : [8000 , 8123 , 5432 ],
12+ "portsAttributes" : {
13+ "8000" : { "label" : " API Service" , "onAutoForward" : " notify" },
14+ "8123" : { "label" : " Agents Service" , "onAutoForward" : " notify" },
15+ "5432" : { "label" : " PostgreSQL" , "onAutoForward" : " silent" }
16+ },
17+ "customizations" : {
18+ "vscode" : {
19+ "extensions" : [
20+ " ms-python.python" ,
21+ " ms-python.black-formatter" ,
22+ " ms-azuretools.vscode-docker" ,
23+ " github.vscode-pull-request-github" ,
24+ " mtxr.sqltools" ,
25+ " mtxr.sqltools-driver-pg"
26+ ],
27+ "settings" : {
28+ "python.defaultInterpreterPath" : " /usr/local/bin/python" ,
29+ "editor.formatOnSave" : true ,
30+ "editor.defaultFormatter" : " ms-python.black-formatter"
31+ }
32+ }
33+ },
34+ "remoteUser" : " root"
35+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
5+ echo " 🚀 deepfake-agentic-ai Codespace Setup"
6+ echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
7+
8+ # --- 1. Copy .env if it doesn't exist ---
9+ if [ ! -f .env ]; then
10+ echo " 📋 Creating .env from .env.example..."
11+ cp .env.example .env
12+ # Set dev defaults so docker compose works immediately
13+ sed -i ' s/your_db/deepfake_dev/' .env
14+ sed -i ' s/your_user/devuser/' .env
15+ sed -i ' s/your_passsword/devpassword/' .env
16+ sed -i ' s|postgresql+psycopg2://user:password@db:5432/dbname|postgresql+psycopg2://devuser:devpassword@db:5432/deepfake_dev|' .env
17+ echo " ✅ .env ready"
18+ fi
19+
20+ # --- 2. Install requirements for all services ---
21+ for service in api agents ml; do
22+ if [ -f " $service /requirements.txt" ]; then
23+ echo " 📦 Installing $service /requirements.txt..."
24+ pip install --quiet -r " $service /requirements.txt"
25+ fi
26+ done
27+
28+ # --- 3. Spin up all services via Docker Compose ---
29+ echo " 🐳 Starting Docker Compose (api, agents, ml, db)..."
30+ docker compose up -d --build
31+
32+ echo " "
33+ echo " ✅ All services are up!"
34+ echo " API → http://localhost:8000"
35+ echo " Agents → http://localhost:8123"
36+ echo " DB → localhost:5432"
37+ echo " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
Original file line number Diff line number Diff line change 9595 labels : ${{ steps.meta.outputs.labels }}
9696 cache-from : type=gha
9797 cache-to : type=gha,mode=max
98- ` ` `
Original file line number Diff line number Diff line change 1+ name : Codespaces Prebuild
2+
3+ on :
4+ push :
5+ branches :
6+ - codespaces
7+ - main
8+ workflow_dispatch :
9+
10+ jobs :
11+ prebuild :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v3
23+
24+ - name : Log in to GitHub Container Registry
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ghcr.io
28+ username : ${{ github.actor }}
29+ password : ${{ secrets.GITHUB_TOKEN }}
30+
31+ - name : Prebuild API image
32+ uses : docker/build-push-action@v5
33+ with :
34+ context : .
35+ file : Dockerfile.api
36+ push : true
37+ tags : ghcr.io/santhosh-p653/deepfake-agentic-ai/api:prebuild
38+ cache-from : type=gha
39+ cache-to : type=gha,mode=max
40+
41+ - name : Prebuild Agents image
42+ uses : docker/build-push-action@v5
43+ with :
44+ context : .
45+ file : Dockerfile.agents
46+ push : true
47+ tags : ghcr.io/santhosh-p653/deepfake-agentic-ai/agents:prebuild
48+ cache-from : type=gha
49+ cache-to : type=gha,mode=max
50+
51+ - name : Prebuild ML image
52+ uses : docker/build-push-action@v5
53+ with :
54+ context : .
55+ file : Dockerfile.ml
56+ push : true
57+ tags : ghcr.io/santhosh-p653/deepfake-agentic-ai/ml:prebuild
58+ cache-from : type=gha
59+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments