Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
@initcron
initcron / db-pod.yaml
Created September 23, 2025 18:51
db pod spec with CrashLoopBackOff fixed
apiVersion: v1
kind: Pod
metadata:
name: db
labels:
app: postgres
role: database
tier: back
spec:
containers:
# .trivyignore
# Trivy ignore file for known false positives or accepted risks
# Example: Ignore specific CVE that doesn't affect our use case
# CVE-2023-12345
# Example: Ignore vulnerabilities in specific packages
# pkg:pypi/package-name@version
# Note: Only ignore vulnerabilities after proper risk assessment
@initcron
initcron / ci.yaml
Last active September 23, 2025 07:07
.github/workflows/ci.yml
name: CI Pipeline
on:
push:
branches: [ "main", "develop" ]
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/tech-stack-advisor
@initcron
initcron / ci.yml
Created September 22, 2025 15:35
.github/workflows/ci.yml
name: CI Pipeline
on:
push:
branches: [ "main", "develop" ]
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/tech-stack-advisor
version: '3.8'
services:
tech-stack-advisor:
build: .
ports:
- "7860:7860"
environment:
- ENV=production
healthcheck:
@initcron
initcron / goose-pr-review.yml
Created September 22, 2025 15:29
goose-pr-review.yml
name: Goose AI PR Review
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
@initcron
initcron / instructions.txt
Created September 22, 2025 15:28
.goose/instructions.txt
You are an expert DevOps engineer reviewing code changes for a machine learning application.
Focus your review on these key areas:
## 🐳 Docker & Containerization
- Dockerfile best practices and optimization
- Multi-stage builds and layer efficiency
- Security considerations (non-root users, minimal base images)
- Health checks and restart policies
@initcron
initcron / Dockerfile
Created September 22, 2025 10:15
Multi Architecture Builds
# syntax=docker/dockerfile:1
# BuildKit optimized Dockerfile with advanced caching and multi-arch support
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH
# Stage 1: Dependencies stage with cache mounts
FROM --platform=$BUILDPLATFORM python:3.11-slim AS dependencies
@initcron
initcron / Dockerfile
Created September 22, 2025 10:13
Dockerfile with Buildkit features
# syntax=docker/dockerfile:1
# BuildKit optimized Dockerfile with advanced caching
# Stage 1: Dependencies stage with cache mounts
FROM python:3.11-slim AS dependencies
WORKDIR /app
# Use cache mount for apt packages
RUN --mount=type=cache,target=/var/cache/apt \
@initcron
initcron / Dockerfile
Created September 22, 2025 10:11
Multi Stage Dockerfile for Tech Stack Advisor
# Multi-stage Dockerfile for Tech Stack Advisor ML App
# Stage 1: Builder stage for training the model
FROM python:3.11-slim AS builder
WORKDIR /app
# Install build dependencies
RUN apt-get update && apt-get install -y \
gcc \