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

View File

@@ -44,7 +44,7 @@ install:
pre-commit install
dev:
python3 -m reflex run
cd peikarband && python3 -m reflex run
kill-dev:
@echo "Killing processes on ports 3000 and 8000..."
@@ -78,12 +78,12 @@ clean:
# Docker commands
docker-build:
DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) docker build \
-f build/docker/Dockerfile \
-f docker/Dockerfile \
-t $(IMAGE_NAME):$(VERSION) \
-t $(IMAGE_NAME):latest \
--build-arg VERSION=$(VERSION) \
--build-arg BUILD_DATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
.
peikarband/
docker-push:
docker tag $(IMAGE_NAME):$(VERSION) $(REGISTRY)/$(IMAGE_NAME):$(VERSION)
@@ -96,23 +96,23 @@ docker-login:
@docker login $(REGISTRY)
docker-up:
docker-compose -f build/docker/docker-compose.yml up -d
docker-compose -f docker/docker-compose.yml up -d
docker-down:
docker-compose -f build/docker/docker-compose.yml down
docker-compose -f docker/docker-compose.yml down
# Helm commands
helm-lint:
helm lint deploy/helm/peikarband
helm lint helm/peikarband
helm-template:
helm template $(HELM_RELEASE) deploy/helm/peikarband --debug
helm template $(HELM_RELEASE) helm/peikarband --debug
helm-package:
helm package deploy/helm/peikarband --destination .
helm package helm/peikarband --destination .
helm-install:
helm install $(HELM_RELEASE) deploy/helm/peikarband \
helm install $(HELM_RELEASE) helm/peikarband \
--namespace $(NAMESPACE) \
--create-namespace \
--set image.repository=$(REGISTRY)/$(IMAGE_NAME) \
@@ -120,7 +120,7 @@ helm-install:
--wait
helm-upgrade:
helm upgrade --install $(HELM_RELEASE) deploy/helm/peikarband \
helm upgrade --install $(HELM_RELEASE) helm/peikarband \
--namespace $(NAMESPACE) \
--set image.repository=$(REGISTRY)/$(IMAGE_NAME) \
--set image.tag=$(VERSION) \
@@ -136,8 +136,8 @@ k8s-deploy: docker-build docker-push helm-upgrade
# Database
migrate:
alembic -c config/alembic.ini upgrade head
cd peikarband && alembic -c config/alembic.ini upgrade head
seed:
python3 tools/scripts/seed_database.py
cd peikarband && python3 tools/scripts/seed_database.py