This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: db | |
labels: | |
app: postgres | |
role: database | |
tier: back | |
spec: | |
containers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
env: | |
REGISTRY: docker.io | |
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/tech-stack-advisor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
env: | |
REGISTRY: docker.io | |
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/tech-stack-advisor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
tech-stack-advisor: | |
build: . | |
ports: | |
- "7860:7860" | |
environment: | |
- ENV=production | |
healthcheck: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Goose AI PR Review | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 \ |
NewerOlder