refactor: complete project restructure - clean and professional

🎯 New Structure:
- landing/ (root) - Only Makefile, .gitignore, .woodpecker.yml
- helm/ - Kubernetes deployment (with argocd inside chart)
- docker/ - Docker build configs
- peikarband/ - All source code (src, tests, assets, config, tools, docs)

 Changes:
- Moved Docker files: build/docker/ → docker/
- Moved Helm charts: deploy/helm/ → helm/
- Moved ArgoCD: deploy/argocd/ → helm/peikarband/argocd/
- Moved all source code to peikarband/
- Removed duplicate files (7 files)
- Removed old empty directories

🐳 Docker Fixes:
- Added npm retry configuration (fetch-retry-mintimeout, etc.)
- Added 3-attempt retry mechanism for reflex export
- Fixed ECONNREFUSED errors
- Updated paths for new structure

📦 Config Updates:
- Makefile: Updated all paths (docker/, helm/, peikarband/)
- .woodpecker.yml: Updated dockerfile and context paths
- .gitignore: Updated data/ path

🧪 Tests:
- ✓ Helm lint passes
- ✓ All paths validated
- ✓ Structure verified

📊 Result:
- Before: 20+ files in root, scattered structure
- After: 3 files + 3 directories, clean and organized
- Production-ready 
This commit is contained in:
Ehsan.Asadi
2025-12-30 21:33:32 +03:30
parent 20267daade
commit b9217fe81e
160 changed files with 294 additions and 2233 deletions

54
docker/Dockerfile.base Normal file
View File

@@ -0,0 +1,54 @@
# Base Image for Peikarband Projects
#
# This Dockerfile should be in a SEPARATE repository: peikarband/base
# It's kept here for reference only.
#
# Purpose: Pre-installed build tools (Python, Node.js, bun, gcc, etc.)
# Registry: hub.peikarband.ir/peikarband/base:latest
#
# This image is built once and cached, making subsequent builds much faster
# All Peikarband projects should use this base image
ARG PYTHON_VERSION=3.11
ARG NODE_VERSION=20
FROM python:${PYTHON_VERSION}-slim AS base
LABEL maintainer="Peikarband Team <dev@peikarband.ir>"
LABEL description="Base image with Python, Node.js, bun, and build tools"
WORKDIR /build
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
curl \
gnupg \
ca-certificates \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js (required for Reflex)
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install bun (required by Reflex for frontend build)
# Retry mechanism for network issues
RUN set -ex && \
for i in 1 2 3 4 5; do \
curl -fsSL https://bun.sh/install | bash && break || \
(echo "Attempt $i failed, retrying in 5 seconds..." && sleep 5); \
done || (echo "Failed to install bun after 5 attempts" && exit 1)
# Add bun to PATH
ENV PATH="/root/.bun/bin:${PATH}"
# Verify installations
RUN python --version && \
node --version && \
npm --version && \
bun --version