This commit is contained in:
152
.dockerignore
Normal file
152
.dockerignore
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
# Peikarband Platform - Docker Ignore File
|
||||||
|
# Optimize Docker build by excluding unnecessary files
|
||||||
|
|
||||||
|
# Git
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.gitattributes
|
||||||
|
|
||||||
|
# CI/CD
|
||||||
|
.github/
|
||||||
|
.gitlab-ci.yml
|
||||||
|
woodpecker.yml
|
||||||
|
.drone.yml
|
||||||
|
|
||||||
|
# IDE & Editors
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
*.egg
|
||||||
|
.pytest_cache/
|
||||||
|
.mypy_cache/
|
||||||
|
.coverage
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.hypothesis/
|
||||||
|
*.cover
|
||||||
|
|
||||||
|
# Virtual Environment
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
ENV/
|
||||||
|
virtualenv/
|
||||||
|
|
||||||
|
# Database
|
||||||
|
*.db
|
||||||
|
*.sqlite
|
||||||
|
*.sqlite3
|
||||||
|
reflex.db
|
||||||
|
*.dump
|
||||||
|
*.sql
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
logs/
|
||||||
|
*.out
|
||||||
|
*.err
|
||||||
|
|
||||||
|
# Environment & Secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
*.pem
|
||||||
|
*.key
|
||||||
|
*.crt
|
||||||
|
secrets/
|
||||||
|
*.secret
|
||||||
|
|
||||||
|
# Documentation (exclude from container, keep only essential)
|
||||||
|
peikarband/docs/
|
||||||
|
*.md
|
||||||
|
!README.md
|
||||||
|
LICENSE
|
||||||
|
|
||||||
|
# Tests (exclude from production image)
|
||||||
|
peikarband/tests/
|
||||||
|
peikarband/config/pytest.ini
|
||||||
|
.pytest_cache/
|
||||||
|
coverage/
|
||||||
|
*.coverage
|
||||||
|
|
||||||
|
# Development
|
||||||
|
Makefile
|
||||||
|
docker-compose.yml
|
||||||
|
docker-compose.*.yml
|
||||||
|
|
||||||
|
# Kubernetes & Helm (exclude from container)
|
||||||
|
helm/
|
||||||
|
docker/docker-compose.yml
|
||||||
|
*.yaml
|
||||||
|
*.yml
|
||||||
|
!requirements.txt
|
||||||
|
!peikarband/**/*.yaml
|
||||||
|
!peikarband/**/*.yml
|
||||||
|
|
||||||
|
# Backup & Temp Files
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
tmp/
|
||||||
|
temp/
|
||||||
|
.cache/
|
||||||
|
|
||||||
|
# Media & Assets (exclude large files but keep necessary ones)
|
||||||
|
# Exclude root level media files
|
||||||
|
/wordpress.gif
|
||||||
|
/banner-3.gif
|
||||||
|
|
||||||
|
# Keep assets directory (now in peikarband/)
|
||||||
|
!peikarband/assets/
|
||||||
|
|
||||||
|
# Node modules (Reflex might need some)
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
|
||||||
|
# OS Files
|
||||||
|
Thumbs.db
|
||||||
|
.DS_Store
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Editor Configs
|
||||||
|
.editorconfig
|
||||||
|
.prettierrc
|
||||||
|
.eslintrc
|
||||||
|
|
||||||
|
# Pre-commit & Linters
|
||||||
|
.pre-commit-config.yaml
|
||||||
|
.flake8
|
||||||
|
.pylintrc
|
||||||
|
mypy.ini
|
||||||
|
.isort.cfg
|
||||||
|
|
||||||
|
# Scripts (keep only necessary ones)
|
||||||
|
peikarband/tools/scripts/*
|
||||||
|
!peikarband/tools/scripts/update-env-json.sh
|
||||||
|
*.sh
|
||||||
|
!entrypoint.sh
|
||||||
|
|
||||||
|
# Jupyter Notebooks
|
||||||
|
*.ipynb
|
||||||
|
.ipynb_checkpoints/
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
TODO.md
|
||||||
|
CHANGELOG.md
|
||||||
|
CONTRIBUTING.md
|
||||||
|
.mailmap
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -65,7 +65,6 @@ temp/
|
|||||||
*.tmp
|
*.tmp
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
.dockerignore
|
|
||||||
|
|
||||||
# Kubernetes secrets
|
# Kubernetes secrets
|
||||||
*secret*.yaml
|
*secret*.yaml
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ COPY --from=builder --chown=peikarband:peikarband /build/peikarband /app/peikarb
|
|||||||
|
|
||||||
# Copy entrypoint script
|
# Copy entrypoint script
|
||||||
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY docker/entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
RUN chmod +x /usr/local/bin/entrypoint.sh && chmod +x /app/peikarband/.web/app/routes.js
|
||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
RUN mkdir -p /app/data /app/logs /app/uploaded_files
|
RUN mkdir -p /app/data /app/logs /app/uploaded_files
|
||||||
@@ -190,7 +190,7 @@ ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/entrypoint.sh"]
|
|||||||
# Start application
|
# Start application
|
||||||
# entrypoint.sh will cd to /app/peikarband and run reflex
|
# entrypoint.sh will cd to /app/peikarband and run reflex
|
||||||
# PYTHONPATH=/app:/app/peikarband allows Python to find both peikarband and peikarband.peikarband
|
# PYTHONPATH=/app:/app/peikarband allows Python to find both peikarband and peikarband.peikarband
|
||||||
# CMD ["run", "--env", "prod", "--loglevel", "info", "--frontend-port", "3000", "--backend-port", "8000"]
|
CMD ["run", "--env", "prod", "--loglevel", "info", "--frontend-port", "3000", "--backend-port", "8000"]
|
||||||
|
|
||||||
# ============================================
|
# ============================================
|
||||||
# Build Information
|
# Build Information
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
tag: "latest"
|
|
||||||
|
|
||||||
# Auto-create registry secret
|
# Auto-create registry secret
|
||||||
registrySecret:
|
registrySecret:
|
||||||
@@ -18,11 +17,6 @@ registrySecret:
|
|||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: hub-registry-secret
|
- name: hub-registry-secret
|
||||||
|
|
||||||
|
|
||||||
# DEBUG MODE: sleep infinity for debugging
|
|
||||||
# NOTE: Use exec probes that always succeed when debugging
|
|
||||||
command: ["/bin/bash", "-c", "sleep infinity"]
|
|
||||||
|
|
||||||
appSecrets:
|
appSecrets:
|
||||||
enabled: false # Set to true if you need database/redis
|
enabled: false # Set to true if you need database/redis
|
||||||
name: peikarband-prod-secrets
|
name: peikarband-prod-secrets
|
||||||
@@ -117,41 +111,24 @@ redis:
|
|||||||
key: "redis-password"
|
key: "redis-password"
|
||||||
|
|
||||||
# Override readiness probe for production
|
# Override readiness probe for production
|
||||||
# DEBUG MODE: Using exec probe that always succeeds (for sleep infinity)
|
# Reflex startup time: 30-60 seconds (per deployment checklist)
|
||||||
# IMPORTANT: httpGet must be explicitly null to prevent merge with values.yaml
|
# Using /ping endpoint (simpler, faster response)
|
||||||
# To switch back to normal operation, replace exec with httpGet and remove null:
|
|
||||||
# httpGet:
|
|
||||||
# path: /ping
|
|
||||||
# port: 8000
|
|
||||||
# initialDelaySeconds: 60
|
|
||||||
# periodSeconds: 10
|
|
||||||
# timeoutSeconds: 5
|
|
||||||
# failureThreshold: 6
|
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet: null # Explicitly null to prevent merge
|
httpGet:
|
||||||
exec:
|
path: /ping
|
||||||
command: ["/bin/sh", "-c", "true"]
|
port: 8000
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 60 # Allow Reflex to fully start (30-60s expected)
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
failureThreshold: 3
|
failureThreshold: 6 # Allow 6 failures = 60s grace period
|
||||||
|
|
||||||
# Override liveness probe
|
# Override liveness probe
|
||||||
# DEBUG MODE: Using exec probe that always succeeds (for sleep infinity)
|
# Using /live endpoint which is specifically designed for liveness checks
|
||||||
# IMPORTANT: httpGet must be explicitly null to prevent merge with values.yaml
|
|
||||||
# To switch back to normal operation, replace exec with httpGet and remove null:
|
|
||||||
# httpGet:
|
|
||||||
# path: /live
|
|
||||||
# port: 8000
|
|
||||||
# initialDelaySeconds: 90
|
|
||||||
# periodSeconds: 15
|
|
||||||
# timeoutSeconds: 5
|
|
||||||
# failureThreshold: 3
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet: null # Explicitly null to prevent merge
|
httpGet:
|
||||||
exec:
|
path: /live
|
||||||
command: ["/bin/sh", "-c", "true"]
|
port: 8000
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 90 # More time for liveness (after readiness)
|
||||||
periodSeconds: 15
|
periodSeconds: 15
|
||||||
timeoutSeconds: 5
|
timeoutSeconds: 5
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user