docker fixes

This commit is contained in:
2025-07-29 01:01:16 +01:00
parent 891e398882
commit 66c513a769
3 changed files with 82 additions and 1 deletions

View File

@@ -19,3 +19,8 @@ yarn-error.log*
# Build output (will be created inside container) # Build output (will be created inside container)
dist/ dist/
# Docker files
*.tar
aaf-systems-transfer-package/
aaf-systems-transfer-package.tar.gz

View File

@@ -8,7 +8,7 @@ WORKDIR /app
COPY app/package*.json ./ COPY app/package*.json ./
# Install dependencies # Install dependencies
RUN npm install RUN npm install --legacy-peer-deps
# Copy the rest of the application code # Copy the rest of the application code
COPY app/ . COPY app/ .

View File

@@ -0,0 +1,76 @@
#!/bin/bash
# AAF Systems Homepage - Create Transfer Package
# This script creates a complete transfer package with the Docker image and scripts
echo "📦 Creating Complete Transfer Package"
echo "===================================="
PACKAGE_DIR="aaf-systems-transfer-package"
IMAGE_TAR="aaf-systems-homepage-docker.tar"
# Check if Docker image tar exists
if [ ! -f "$IMAGE_TAR" ]; then
echo "🔨 Docker image package not found. Building and packaging..."
./package-docker.sh
if [ ! -f "$IMAGE_TAR" ]; then
echo "❌ Failed to create Docker image package"
exit 1
fi
fi
# Create transfer package directory
echo "📁 Creating transfer package directory..."
rm -rf $PACKAGE_DIR
mkdir -p $PACKAGE_DIR
# Copy necessary files
echo "📋 Copying files to package..."
cp $IMAGE_TAR $PACKAGE_DIR/
cp load-and-run-docker.sh $PACKAGE_DIR/
cp stop-docker.sh $PACKAGE_DIR/
# Create a README for the transfer package
cat > $PACKAGE_DIR/README.txt << 'EOF'
AAF Systems Homepage - Transfer Package
======================================
This package contains everything needed to run the AAF Systems Homepage on a target computer.
Contents:
- aaf-systems-homepage-docker.tar: The Docker image
- load-and-run-docker.sh: Script to load and run the Docker image
- stop-docker.sh: Script to stop the Docker container
Instructions:
1. Make sure Docker is installed and running on the target computer
2. Copy this entire folder to the target computer
3. Open terminal in this folder
4. Run: chmod +x *.sh
5. Run: ./load-and-run-docker.sh
The application will be available at http://localhost:8080
To stop the application: ./stop-docker.sh
EOF
# Create archive
echo "🗜️ Creating compressed archive..."
tar -czf aaf-systems-transfer-package.tar.gz $PACKAGE_DIR
echo "✅ Transfer package created successfully!"
echo ""
echo "📦 Package Contents:"
echo "==================="
ls -la $PACKAGE_DIR/
echo ""
echo "📊 Archive Info:"
echo "==============="
ls -lh aaf-systems-transfer-package.tar.gz
echo ""
echo "🚚 Ready for Transfer:"
echo "====================="
echo "Transfer 'aaf-systems-transfer-package.tar.gz' to the target computer"
echo "On target computer: tar -xzf aaf-systems-transfer-package.tar.gz"
echo "Then follow instructions in the README.txt file"