@@ -17,16 +17,25 @@ echo "=========================================="
1717echo " CodeCrow Server Initialization"
1818echo " =========================================="
1919
20- # ── 1. Create directory structure ──────────────────────────────────────────
21- echo " --- 1. Creating directory structure ---"
20+ # ── 1. Install required packages ───────────────────────────────────────────
21+ echo " --- 1. Installing required packages ---"
22+ if ! command -v zstd & > /dev/null; then
23+ apt-get update -qq && apt-get install -y -qq zstd
24+ echo " ✓ zstd installed"
25+ else
26+ echo " ○ zstd already installed"
27+ fi
28+
29+ # ── 2. Create directory structure ──────────────────────────────────────────
30+ echo " --- 2. Creating directory structure ---"
2231mkdir -p " $DEPLOY_DIR " /{releases,backups,config/{java-shared/github-private-key,inference-orchestrator,rag-pipeline,web-frontend}}
2332
24- # ── 2 . Set ownership ─────────────────────────────────────────────────────
25- echo " --- 2 . Setting ownership to $DEPLOY_USER ---"
33+ # ── 3 . Set ownership ─────────────────────────────────────────────────────
34+ echo " --- 3 . Setting ownership to $DEPLOY_USER ---"
2635chown -R " $DEPLOY_USER :$DEPLOY_USER " " $DEPLOY_DIR "
2736
28- # ── 3 . Create sample config files ────────────────────────────────────────
29- echo " --- 3 . Creating sample config placeholders ---"
37+ # ── 4 . Create sample config files ────────────────────────────────────────
38+ echo " --- 4 . Creating sample config placeholders ---"
3039
3140if [ ! -f " $DEPLOY_DIR /config/java-shared/application.properties" ]; then
3241 cat > " $DEPLOY_DIR /config/java-shared/application.properties" << 'SAMPLE '
98107 echo " ○ .env already exists (skipped)"
99108fi
100109
101- # ── 4 . Print summary ─────────────────────────────────────────────────────
110+ # ── 5 . Print summary ─────────────────────────────────────────────────────
102111echo " "
103112echo " =========================================="
104113echo " Server initialized! Directory layout:"
@@ -108,7 +117,7 @@ echo " $DEPLOY_DIR/"
108117echo " ├── docker-compose.prod.yml ← copy from repo"
109118echo " ├── server-deploy.sh ← copy from repo"
110119echo " ├── releases/"
111- echo " │ └── codecrow-images.tar.gz ← uploaded by CI"
120+ echo " │ └── codecrow-images.tar.zst ← uploaded by CI"
112121echo " └── config/"
113122echo " ├── java-shared/"
114123echo " │ ├── application.properties ← YOUR secrets"
0 commit comments