Skip to content

Commit 327c8d4

Browse files
committed
2 parents 327c2b6 + 163471d commit 327c8d4

File tree

5 files changed

+738
-573
lines changed

5 files changed

+738
-573
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to Google Cloud Run
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "deep_security/**"
9+
10+
jobs:
11+
deploy:
12+
name: Build & Deploy Deep Security
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Authenticate with Google Cloud
20+
uses: google-github-actions/auth@v2
21+
with:
22+
credentials_json: ${{ secrets.GCP_SA_KEY }}
23+
24+
- name: Set up Cloud SDK
25+
uses: google-github-actions/setup-gcloud@v2
26+
27+
- name: Configure Docker for Google Artifact Registry
28+
run: gcloud auth configure-docker gcr.io
29+
30+
- name: Build Docker Image
31+
working-directory: ./deep_security
32+
run: |
33+
docker build --platform linux/amd64 -t gcr.io/junction-hack-50b8a/deep-security .
34+
35+
- name: Push Docker Image
36+
run: |
37+
docker push gcr.io/junction-hack-50b8a/deep-security
38+
39+
- name: Deploy to Cloud Run
40+
run: |
41+
gcloud run deploy deep-security \
42+
--image gcr.io/junction-hack-50b8a/deep-security \
43+
--platform managed \
44+
--region europe-west1 \
45+
--allow-unauthenticated \
46+
--project junction-hack-50b8a
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Push Deep Security to GCP Container Registry
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "deep_security/**"
9+
10+
jobs:
11+
deploy:
12+
name: Build & Deploy Factory
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Authenticate with Google Cloud
20+
uses: google-github-actions/auth@v2
21+
with:
22+
credentials_json: ${{ secrets.GCP_SA_KEY }}
23+
24+
- name: Set up Cloud SDK
25+
uses: google-github-actions/setup-gcloud@v2
26+
27+
- name: Configure Docker for Google Artifact Registry
28+
run: gcloud auth configure-docker gcr.io
29+
30+
- name: Build Docker Image
31+
working-directory: ./deep_security
32+
run: |
33+
docker build --platform linux/amd64 -t gcr.io/junction-hack-50b8a/deep-security .
34+
35+
- name: Push Docker Image
36+
run: |
37+
docker push gcr.io/junction-hack-50b8a/deep-security

deep_security/.dockerignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Virtual environments
2+
.venv/
3+
venv/
4+
env/
5+
ENV/
6+
7+
# Python cache
8+
__pycache__/
9+
*.pyc
10+
*.pyo
11+
*.pyd
12+
.Python
13+
*.so
14+
*.egg-info/
15+
.eggs/
16+
dist/
17+
build/
18+
19+
# IDE
20+
.idea/
21+
.vscode/
22+
*.swp
23+
*.swo
24+
.DS_Store
25+
26+
# Git
27+
.git/
28+
.gitignore
29+
30+
# LangGraph specific
31+
.langgraph/
32+
.langgraph_api/
33+
34+
# Environment files (user should mount these or set via docker run -e)
35+
.env
36+
.env.local
37+
.env.*.local
38+
39+
# Documentation
40+
README.md
41+
CLAUDE.md
42+
LICENSE
43+
44+
# Testing
45+
.pytest_cache/
46+
.coverage
47+
htmlcov/
48+
.tox/
49+
50+
# Logs
51+
*.log
52+
logs/
53+
tmp/
54+
temp/
55+
56+
# Jupyter
57+
.ipynb_checkpoints/
58+
59+
60+

deep_security/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM python:3.12-slim
2+
3+
# Install build-essential for g++ and other build tools
4+
RUN apt-get update && apt-get install -y --no-install-recommends \
5+
curl \
6+
build-essential \
7+
g++ \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
ENV PYTHONDONTWRITEBYTECODE=1 \
11+
PYTHONUNBUFFERED=1 \
12+
PIP_NO_CACHE_DIR=1
13+
14+
WORKDIR /app
15+
16+
# Install uv and make sure it is on PATH
17+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
18+
ENV PATH="/root/.local/bin:${PATH}"
19+
20+
# Copy the application source
21+
COPY . .
22+
23+
RUN uv sync
24+
25+
# Expose the LangGraph server port
26+
EXPOSE 2024
27+
28+
# Run langgraph dev server using uv run to execute in the venv
29+
# --host 0.0.0.0 allows external connections in Docker
30+
CMD ["uv", "run", "langgraph", "dev", "--allow-blocking", "--host", "0.0.0.0", "--port", "2024"]
31+

0 commit comments

Comments
 (0)