<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arun Shinde</title>
    <description>The latest articles on DEV Community by Arun Shinde (@arunshinde).</description>
    <link>https://dev.to/arunshinde</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3718180%2F659a58c0-8ea3-47fd-bdfd-d27e2095c984.jpg</url>
      <title>DEV Community: Arun Shinde</title>
      <link>https://dev.to/arunshinde</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arunshinde"/>
    <language>en</language>
    <item>
      <title>New Year, New You: Architecting a High-Performance AI Portfolio using Python and Gemini</title>
      <dc:creator>Arun Shinde</dc:creator>
      <pubDate>Sun, 01 Feb 2026 02:58:53 +0000</pubDate>
      <link>https://dev.to/arunshinde/new-year-new-you-architecting-a-high-performance-ai-portfolio-using-python-and-gemini-4amm</link>
      <guid>https://dev.to/arunshinde/new-year-new-you-architecting-a-high-performance-ai-portfolio-using-python-and-gemini-4amm</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/new-year-new-you-google-ai-2025-12-31"&gt;New Year, New You Portfolio Challenge Presented by Google AI&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Me
&lt;/h2&gt;

&lt;p&gt;I am a Principal Product Architect and Google Developer Expert (Cloud) with over 12 years of experience in designing scalable, security-first cloud ecosystems. My goal with this portfolio was to move beyond a static résumé and create a "System Architect’s Console"—a live, gamified environment that reflects my expertise in migrating complex monoliths to containerized, AI-driven architectures. I wanted to show how a senior-level perspective can leverage Google AI to solve enterprise-scale problems like compliance and developer productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Portfolio
&lt;/h2&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__cloud-run"&gt;
  &lt;iframe height="600px" src="https://devto-portfolio-766707551422.asia-south1.run.app/"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;My development process leveraged a minimal dependency surface area and advanced AI-driven workflows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The "AI-First" Development Process&lt;/strong&gt;&lt;br&gt;
This project was developed in partnership with &lt;strong&gt;Antigravity&lt;/strong&gt;, an agentic AI assistant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Iterative Design:&lt;/strong&gt; I used Antigravity for the dynamic creation and refinement of the "Obsidian" CSS theme and responsive layouts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Verification:&lt;/strong&gt; I utilized Antigravity's browser sub-agents to perform real-time testing of custom logic, such as popover positioning and chat accuracy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Architectural Guardrails:&lt;/strong&gt; Antigravity assisted in implementing the Firestore caching layer and serverless deployment pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. The Tech Stack&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Zero-Framework Python using the standard http.server library to minimize container size (under 150MB) and reduce cold start latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Premium Obsidian-Style UI built with Vanilla HTML/CSS/JS (no heavy frameworks).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; Firestore (Datastore Mode) using a Cache-Aside Pattern with raw REST API calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Infrastructure:&lt;/strong&gt; Hosted on &lt;strong&gt;Google Cloud Run&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD:&lt;/strong&gt; Deployed via &lt;strong&gt;Google Cloud Build&lt;/strong&gt;, pushing images to &lt;strong&gt;Artifact Registry&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Google AI Integration&lt;/strong&gt;&lt;br&gt;
AI is at the core of the user experience:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vertex AI (Gemini 3.0 Flash Preview):&lt;/strong&gt; Powers the "AI Chat Consultant" and profile summarizer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounding &amp;amp; Data Fencing:&lt;/strong&gt; The AI is grounded using a PDF resume on Google Cloud Storage (GCS) and uses "Hard Boundary" prompts to prevent information cross-contamination.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompting Strategies:&lt;/strong&gt; Integrated "Strict Data Fencing" and an "Agentic Professionalism" executive persona for the AI consultant to ensure PII security.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'm Most Proud Of
&lt;/h2&gt;

&lt;p&gt;I am most proud of the &lt;strong&gt;Standard Library Power&lt;/strong&gt; and &lt;strong&gt;Cost Efficiency&lt;/strong&gt; achieved in this build.&lt;/p&gt;

&lt;p&gt;By avoiding heavy frameworks and using Firestore to cache AI responses at the edge, I reduced potential API costs by over 80% for common navigation paths. Furthermore, the &lt;strong&gt;Intelligent Positioning&lt;/strong&gt; logic in Vanilla JS—which dynamically calculates viewport boundaries to prevent content clipping—proves that professional, high-fidelity UX can be achieved through pure engineering without the overhead of modern frontend frameworks.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>googleaichallenge</category>
      <category>portfolio</category>
      <category>gemini</category>
    </item>
    <item>
      <title>How Gemini, Antigravity, and BigQuery Help Create a License Compliance Checker</title>
      <dc:creator>Arun Shinde</dc:creator>
      <pubDate>Thu, 22 Jan 2026 18:42:16 +0000</pubDate>
      <link>https://dev.to/gde/how-gemini-antigravity-and-bigquery-help-create-a-license-compliance-checker-2ibc</link>
      <guid>https://dev.to/gde/how-gemini-antigravity-and-bigquery-help-create-a-license-compliance-checker-2ibc</guid>
      <description>&lt;p&gt;&lt;strong&gt;Automate software supply chain auditing using Gemini’s semantic reasoning and BigQuery’s (deps_dev_v1)&lt;/strong&gt;  &lt;strong&gt;massive open-source dataset.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whenever we start a new project, we add many library dependencies to it. Usually, there is no time to check the licenses or compliance rules for every single one of these libraries. This is also true when adding a new library into an existing project — sometimes the compliance issues are missed entirely. If the project is large, manual checking is a very tedious and time-taking process.&lt;/p&gt;

&lt;p&gt;Checking license types and compliance is usually a manual task. While security scanning (VAPT) is a standard for security, license checking is still often done by hand. Most of the time, the licenses of “transitive dependencies” (the libraries your libraries use) are not checked. A single “copyleft” license hidden deep inside a transitive dependency can create big legal risks for proprietary software. Expensive tools are available in the market for this, but we all cannot afford them.&lt;/p&gt;

&lt;p&gt;To solve this, the &lt;strong&gt;License Compliance Agent&lt;/strong&gt; was created by leveraging Google Open Source Insights (&lt;a href="https://deps.dev/" rel="noopener noreferrer"&gt;deps.dev&lt;/a&gt;) via BigQuery and the reasoning power of Gemini and Vertex AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Development Spotlight: From Requirements to Reality with Antigravity
&lt;/h3&gt;

&lt;p&gt;To build this agent, I leveraged &lt;strong&gt;Antigravity&lt;/strong&gt; to move from idea to execution at lightning speed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verified Coding:&lt;/strong&gt; I provided the requirements, and Antigravity handled the implementation, verifying every logic gate and recursive scan along the way to ensure perfection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Browser-Led Debugging:&lt;/strong&gt; Instead of standard log-chasing, the agent used its built-in browser tools to interact with the UI and backend, catching complex cloud integration errors in real-time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduced Friction:&lt;/strong&gt; It turned a complex multi-file architecture into a working reality, allowing me to focus on the overall strategy while it handled the technical heavy lifting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65fwa0myf2nui9ita24h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65fwa0myf2nui9ita24h.png" alt="Tech Components" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tech Stack &amp;amp; Tools
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Technical Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Runtime:&lt;/strong&gt; Python 3.12, Flask, Hypercorn (HTTP/2)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; Vanilla JS, HTML5, CSS3 (No frameworks)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Engine:&lt;/strong&gt; Google Vertex AI (Gemini 3.0 Flash — Preview)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Source:&lt;/strong&gt; Google BigQuery (Public Dataset: deps_dev_v1) &amp;amp; Cloud Datastore for caching&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infrastructure:&lt;/strong&gt; Cloud Run (Serverless), Github Actions, Cloud Build, Artifact Registry&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security (Optional):&lt;/strong&gt; Hybrid Model (IAP + API Key), Secret Manager, and Workload Identity Federation (Keyless Auth)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Development Tools:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Antigravity:&lt;/strong&gt; The agentic IDE used for autonomous planning, multi-file coding, and browser-based debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IntelliJ IDEA:&lt;/strong&gt; The primary IDE for Java/Python development and project management.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project Architecture: How the Agent Works
&lt;/h3&gt;

&lt;p&gt;The system is designed to be a “Sentinel” that watches over your code. Users can interact with the system via a standalone web dashboard to perform deep analysis of their projects.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A Strict Policy Enforcement Checker:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;A central** policy.json &lt;strong&gt;file acts as a strict gatekeeper. It contains a list of&lt;/strong&gt; allowed &lt;strong&gt;and&lt;/strong&gt; banned** licenses.
&lt;/li&gt;
&lt;li&gt;Users can add more license types into the respective categories as per their requirements. The code relies on this list to decide whether to process the build, ensuring non-compliant code never reaches production.
&lt;/li&gt;
&lt;li&gt;Cost Optimization:** By keeping this file, the system reduces AI costs by skipping known license types.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using BigQuery to Solve the Dependency Problem:&lt;/strong&gt;
The system uses the deps_dev_v1 dataset in BigQuery. In the code written for bq_service.py, batch queries find the full list of dependencies, including transitive ones. This removes the need for manual checking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini + Vertex AI as a “Legal Brain”:&lt;/strong&gt; 
For “Unknown” or “non-standard” licenses, Gemini 3.0 Flash reads messy legal text and identifies the correct license name using smart reasoning. It includes a** Self-Healing** feature to fix its own data if the format is wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Special Scanner for “Fat JARs”:&lt;/strong&gt;
Java developers often pack hundreds of libraries inside a single “Fat JAR,” which standard tools miss. A special scanner in jar_checker.py goes deep into hidden folders like BOOT-INF/lib/ to find the correct metadata.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure and Fast GCP Infrastructure:&lt;/strong&gt;

&lt;ol&gt;
&lt;li&gt;While portable across any containerized environment, the system is optimized for Google Cloud Run to provide serverless scaling. It utilizes Workload Identity Federation (WIF) for a secure, keyless connection to GitHub Actions, eliminating the risk of long-lived service account keys.
&lt;/li&gt;
&lt;li&gt;To ensure high-performance execution, the system employs a persistent caching layer via &lt;strong&gt;Cloud Datastore&lt;/strong&gt; that stores AI-generated compliance results for a &lt;strong&gt;configurable duration&lt;/strong&gt; (defaulting to 30 days). This strategy significantly reduces operational costs by reusing previous analyses and provides a lightning-fast experience for recurring dependency scans.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Deployment Options
&lt;/h3&gt;

&lt;p&gt;The License Compliance Agent supports a variety of deployment methods to fit any environment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CI/CD Integration&lt;/strong&gt; : Seamlessly integrate with &lt;strong&gt;GitHub Actions&lt;/strong&gt; , &lt;strong&gt;Docker&lt;/strong&gt; , or &lt;strong&gt;Cloud Build&lt;/strong&gt; to block non-compliant releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdusub54gudaok7fn3v1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdusub54gudaok7fn3v1l.png" alt="GitHub CI/CD Integration" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standalone Web Dashboard&lt;/strong&gt; : Host a visual interface for manual uploads and quick audits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpzv25pfdhkcg57ap06g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbpzv25pfdhkcg57ap06g.png" alt="Cloud Run Deployment" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local Use&lt;/strong&gt; : Run locally via &lt;strong&gt;localhost&lt;/strong&gt; or &lt;strong&gt;Docker&lt;/strong&gt; for pre-commit verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Deployment&lt;/strong&gt; : Utilize a &lt;strong&gt;“Zero-Config”&lt;/strong&gt; script for rapid setup and configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Use cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SBOM Generation:&lt;/strong&gt; Automatically generates a full Software Bill of Materials for any project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legacy Auditing:&lt;/strong&gt; Deep-scan older projects or compiled JARs to identify forgotten risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-Release Compliance:&lt;/strong&gt; Acts as a final CI/CD checkpoint to prevent restricted licenses from entering production builds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy Control:&lt;/strong&gt; Enforce uniform licensing standards across the entire organization.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  A Note on AI Reliability
&lt;/h3&gt;

&lt;p&gt;While AI is a sophisticated “Legal Brain,” LLMs can occasionally struggle with highly ambiguous legal language. By leveraging BigQuery to provide the vast majority of verified license data and using AI specifically for “edge cases,” this tool transforms an manual audit into a manageable final human review.&lt;/p&gt;

&lt;h3&gt;
  
  
  Future Improvements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Memory Banking:&lt;/strong&gt; Implementing a vector-based memory bank to “remember” and associate similar license snippets without re-running full analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost-Optimized Predictive Pre-Fetching:&lt;/strong&gt; Implementing logic to scan top-level manifests early, allowing for batch processing and early-exit strategies that reduce overall API and compute costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced PDF/Excel Reporting:&lt;/strong&gt; Automated generation of formal compliance certificates and legal reports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time IDE Integration:&lt;/strong&gt; Developing plugins for IntelliJ IDEA or VS Code to flag licenses during active coding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Scanning Integration:&lt;/strong&gt; Merging license compliance with CVE vulnerability data for holistic risk analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;By combining BigQuery’s massive data with Gemini’s intelligence and Antigravity’s rapid development, this project turns a difficult manual task into a smooth, automated part of the development workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explore the project on GitHub&lt;/strong&gt; : &lt;a href="https://github.com/arunshinde/license-compliance-agent" rel="noopener noreferrer"&gt;arunshinde/license-compliance-agent&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This project was architected and built with the assistance of&lt;/em&gt; &lt;a href="https://antigravity.google/" rel="noopener noreferrer"&gt;&lt;em&gt;Antigravity&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, an advanced AI coding agent.&lt;/em&gt;&lt;/p&gt;




</description>
      <category>antigravity</category>
      <category>vertexai</category>
      <category>runcloud</category>
      <category>googlegeminiai</category>
    </item>
    <item>
      <title>Enhancing Web Application Security with Cloud Run Sidecar Containers</title>
      <dc:creator>Arun Shinde</dc:creator>
      <pubDate>Mon, 27 Jan 2025 03:02:01 +0000</pubDate>
      <link>https://dev.to/gde/enhancing-web-application-security-with-cloud-run-sidecar-containers-4ann</link>
      <guid>https://dev.to/gde/enhancing-web-application-security-with-cloud-run-sidecar-containers-4ann</guid>
      <description>&lt;p&gt;Cloud Run offers a robust serverless platform for deploying containerized applications. By utilizing sidecar containers, developers gain enhanced control over security, resource optimization, and application architecture. This article explores a practical use case of leveraging sidecar containers to strengthen a web application’s security posture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Challenge: Securing Monolithic Applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional web applications often bundle frontend and backend components into a single deployable unit, leading to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tight Coupling:&lt;/strong&gt; Frontend and backend are packaged together (e.g., in a single JAR file).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large Deployment Size:&lt;/strong&gt; The combined size of the backend code and static assets can be significant&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inefficient Resource Usage:&lt;/strong&gt; The backend, often a full-fledged application server like Spring Boot with Tomcat, is used to serve both dynamic content and static files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security Risks:&lt;/strong&gt; Security rules applied at the backend might not be optimal for the frontend, potentially leaving it vulnerable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Solution: Sidecar Containers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cloud Run sidecar containers provide a powerful approach to decouple frontend and backend components, enhancing security and efficiency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Development Environment:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following development environment was used for this project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Operating System: macOS&lt;/li&gt;
&lt;li&gt;IDE: Eclipse&lt;/li&gt;
&lt;li&gt;JDK: OpenJDK 23&lt;/li&gt;
&lt;li&gt;Node.js: v20.11.0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Deployment to Cloud Run:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The application will be deployed using the Cloud Run dashboard within the Google Cloud Console. The image is getting pushed into the Container Registry and not in the Artifact Registry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Case: Separating Static Content and Business Logic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To demonstrate this approach, let’s consider a web application with a Java backend and a frontend composed of static files. I have created a &lt;a href="https://github.com/arunshinde/cloud-run-multicontainer" rel="noopener noreferrer"&gt;&lt;strong&gt;GitHub repository&lt;/strong&gt;&lt;/a&gt; with the code for a &lt;a href="https://github.com/arunshinde/cloud-run-multicontainer" rel="noopener noreferrer"&gt;&lt;strong&gt;Cloud Run multi-container&lt;/strong&gt;&lt;/a&gt; application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implementing Sidecar Containers:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A sample Java Spring Boot application with the following structure demonstrates this approach:&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Nginx Sidecar Deployment&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The static folder contains only index.html. The Nginx configuration files located in the code repository at below locations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;src/main/resources/docker-files/frontend-container/default.conf
src/main/resources/docker-files/frontend-container/nginx.conf
src/main/resources/docker-files/frontend-container/Dockerfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To create the Nginx sidecar container image, use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker buildx build -t gcr.io/{project_name}/{project_name}-frontend:latest -f src/main/resources/docker-files/frontend-container/Dockerfile --platform linux/amd64 .
docker push gcr.io/{project_name}/{project_name}-frontend:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Java Sidecar Deployment
&lt;/h4&gt;

&lt;p&gt;To prepare the Java backend for deployment, create a JAR with excluding static content from application using a Maven profile. This profile is already created in the pom.xml called exclude-static. Execute following command from the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mvn clean package -P exclude-static
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Dockerfile for the backend container utilizes this JAR file to build the container image. To create the Java sidecar container image, use the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker buildx build -t gcr.io/{project_name}/{project_name}-backend:latest -f src/main/resources/docker-files/backend-container/Dockerfile --platform linux/amd64
docker push gcr.io/{project_name}/{project_name}-backend:latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Deploying to Cloud Run&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Navigate to Cloud Run:&lt;/strong&gt; In the Google Cloud Console, go to the Cloud Run dashboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a New Service:&lt;/strong&gt; Click “Create Service” to deploy the application as a new service. (You can also deploy to an existing service if needed.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nginx Container:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select the Nginx image you pushed to Container Registry (or Artifact Registry, the recommended replacement).&lt;/li&gt;
&lt;li&gt;Set Memory to 512 MB and CPU to 1.&lt;/li&gt;
&lt;li&gt;Leave other values at their defaults.&lt;/li&gt;
&lt;li&gt;Click Done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbu8nf6inpivry3z2wq13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbu8nf6inpivry3z2wq13.png" alt="Cloud Run Deployment" width="800" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figv7gi4a11pz94khpjtw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figv7gi4a11pz94khpjtw.png" alt="Cloud Run Deployment Settings" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwa2lhrl76r90fdv2v7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkwa2lhrl76r90fdv2v7z.png" alt="Cloud Run Deployment Container" width="800" height="771"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Backend Container:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click “Add Container.”&lt;/li&gt;
&lt;li&gt;Select the Java image you pushed to Container Registry (or Artifact Registry)&lt;/li&gt;
&lt;li&gt;Set Memory to 512 MB and CPU to 1.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container startup order:&lt;/strong&gt; Select the &lt;strong&gt;Nginx container&lt;/strong&gt; as the main container to ensure it starts first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health Check:&lt;/strong&gt; Configure a startup probe with the following values Initial delay (10 seconds), Timeout (5 seconds), Failure threshold(3)&lt;/li&gt;
&lt;li&gt;Leave other values at their defaults.&lt;/li&gt;
&lt;li&gt;Click Done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbtagjx3vkvh5qbx7i26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhbtagjx3vkvh5qbx7i26.png" alt="Cloud Run Deploy" width="800" height="727"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy:&lt;/strong&gt; Click “Deploy” to deploy the service with both containers.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Test Out:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;After deploying the application, you can test it out by:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accessing the Cloud Run Service URL:&lt;/strong&gt; This will display the content from index.html, served by the Nginx sidecar container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbp7qv8fwo2bl8p9wgkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqbp7qv8fwo2bl8p9wgkh.png" alt="Request Served from Nginx" width="800" height="273"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Request served from the Nginx server&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Appending Servlet Paths:&lt;/strong&gt; Add /hello-servlet-1 or /hello-servlet-2 to the URL to access the respective content from those servlets. These requests will be served by the Java backend container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3508jc3jrvpquxoma23q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3508jc3jrvpquxoma23q.png" alt="Request Served from Nginx - HelloServlet1" width="800" height="146"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Request served from the HelloServlet1 servlet&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwphxkrgitw9psjqe3giw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwphxkrgitw9psjqe3giw.png" alt="Request Served from Nginx - HelloServlet2" width="800" height="198"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Request served from the HelloServlet2 servlet&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now check what security configs applied by the server when those requests served.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1eg8u51jq14jiahvi6vd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1eg8u51jq14jiahvi6vd.png" alt="Request Served from Nginx - Security default.conf" width="800" height="416"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Response Headers — All added security configs in the default.conf has been applied.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fermatlkw88s7um5ukly7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fermatlkw88s7um5ukly7.png" alt="Request Served from Nginx - Security Java Server" width="800" height="292"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;No security configs added by Nginx server on Java Servlet response. We can add rules if required.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Benefits of Container Separation&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Improved Security:&lt;/strong&gt; Isolating components minimizes the impact of potential vulnerabilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enhanced Performance:&lt;/strong&gt; Optimizes resource usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Deployments:&lt;/strong&gt; Smaller container images result in quicker deployments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Increased Scalability:&lt;/strong&gt; Independently scale components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplified Maintenance:&lt;/strong&gt; Decoupled components are easier to maintain.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Beyond Static Content&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sidecar containers can also be used for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Monitoring, logging, Observability&lt;/li&gt;
&lt;li&gt;Asynchronous tasks&lt;/li&gt;
&lt;li&gt;Security scanning&lt;/li&gt;
&lt;li&gt;API management&lt;/li&gt;
&lt;li&gt;Data transformation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cloud Run sidecar containers provide a powerful tool for enhancing the security and performance of your web applications. By decoupling components and applying targeted security measures, you can significantly improve your application’s overall security posture and user experience.&lt;/p&gt;




</description>
      <category>websecurity</category>
      <category>googlecloudrun</category>
      <category>googlecloudplatform</category>
      <category>gcpappdev</category>
    </item>
  </channel>
</rss>
