Enhance development workflow and deployment practices for Archipelago
- Updated the Development-Workflow documentation to clarify deployment strategy, emphasizing direct deployment to the live system for testing. - Added detailed instructions for the deployment command, including syncing code, building frontend and backend, and restarting services. - Improved SSH key management section to assist with authentication issues. - Expanded the testing workflow to include steps for checking logs and syncing changes back to the ISO build. - Updated the ISO build integration section to ensure system-level changes are captured for future builds. - Refactored various sections for clarity and completeness, including deployment paths and system configuration files.
This commit is contained in:
@@ -232,22 +232,53 @@ mkdir -p "$ARCH_DIR/scripts"
|
||||
echo " Including root filesystem..."
|
||||
cp "$ROOTFS_TAR" "$ARCH_DIR/rootfs.tar"
|
||||
|
||||
# Copy backend binary
|
||||
if [ -f "$SCRIPT_DIR/../core/target/release/archipelago" ]; then
|
||||
echo " Including backend binary..."
|
||||
cp "$SCRIPT_DIR/../core/target/release/archipelago" "$ARCH_DIR/bin/"
|
||||
# Build and copy backend binary
|
||||
echo " Building backend binary for Linux x86_64..."
|
||||
BACKEND_DOCKERFILE="$WORK_DIR/Dockerfile.backend"
|
||||
cat > "$BACKEND_DOCKERFILE" <<'BACKENDFILE'
|
||||
FROM rust:1.93-bookworm as builder
|
||||
WORKDIR /build
|
||||
COPY core ./core
|
||||
RUN cd core && cargo build --release --bin archipelago
|
||||
BACKENDFILE
|
||||
|
||||
if docker build --platform linux/amd64 -t archipelago-backend -f "$BACKEND_DOCKERFILE" "$SCRIPT_DIR/.." 2>&1 | tail -20; then
|
||||
echo " Extracting backend binary..."
|
||||
BACKEND_CONTAINER=$(docker create --platform linux/amd64 archipelago-backend)
|
||||
docker cp "$BACKEND_CONTAINER:/build/core/target/release/archipelago" "$ARCH_DIR/bin/" && \
|
||||
echo " ✅ Backend binary included ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
|
||||
docker rm "$BACKEND_CONTAINER"
|
||||
else
|
||||
echo " ⚠️ Backend build failed - using existing binary if available"
|
||||
if [ -f "$SCRIPT_DIR/../core/target/release/archipelago" ]; then
|
||||
cp "$SCRIPT_DIR/../core/target/release/archipelago" "$ARCH_DIR/bin/"
|
||||
echo " Using local backend binary (may not be compatible)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Copy web UI (check both possible locations)
|
||||
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
|
||||
echo " Including web UI from web/dist/neode-ui..."
|
||||
cp -r "$SCRIPT_DIR/../web/dist/neode-ui" "$ARCH_DIR/web-ui"
|
||||
elif [ -d "$SCRIPT_DIR/../neode-ui/dist" ]; then
|
||||
echo " Including web UI from neode-ui/dist..."
|
||||
cp -r "$SCRIPT_DIR/../neode-ui/dist" "$ARCH_DIR/web-ui"
|
||||
# Build and copy web UI
|
||||
echo " Building web UI..."
|
||||
cd "$SCRIPT_DIR/../neode-ui"
|
||||
if npm run build 2>&1 | tail -5; then
|
||||
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
|
||||
echo " Including web UI from web/dist/neode-ui..."
|
||||
cp -r "$SCRIPT_DIR/../web/dist/neode-ui" "$ARCH_DIR/web-ui"
|
||||
echo " ✅ Web UI included ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))"
|
||||
fi
|
||||
else
|
||||
echo " ⚠️ Web UI not found - build it first with: cd neode-ui && npm run build"
|
||||
echo " ⚠️ Web UI build failed"
|
||||
# Try to use existing build
|
||||
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
|
||||
echo " Using existing web UI build..."
|
||||
cp -r "$SCRIPT_DIR/../web/dist/neode-ui" "$ARCH_DIR/web-ui"
|
||||
elif [ -d "$SCRIPT_DIR/../neode-ui/dist" ]; then
|
||||
echo " Using neode-ui/dist..."
|
||||
cp -r "$SCRIPT_DIR/../neode-ui/dist" "$ARCH_DIR/web-ui"
|
||||
else
|
||||
echo " ❌ No web UI available"
|
||||
fi
|
||||
fi
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# Copy app manifests
|
||||
if [ -d "$SCRIPT_DIR/../apps" ]; then
|
||||
|
||||
Reference in New Issue
Block a user