23 lines
676 B
Bash
23 lines
676 B
Bash
#!/bin/bash
|
|
# Script to prepare the application environment
|
|
|
|
export REGION="local"
|
|
echo "Preparing deployment for region: $REGION"
|
|
|
|
# Make sure scripts are executable
|
|
chmod +x start-app.sh stop-app.sh
|
|
|
|
# Build and tag Docker image
|
|
docker build -t simple-web-app:latest .
|
|
docker tag simple-web-app:latest antonin193/simple-web-app:latest
|
|
|
|
# Push to Docker Hub if needed
|
|
echo "Pushing image to Docker Hub..."
|
|
docker push antonin193/simple-web-app:latest
|
|
|
|
# Create directory for persistent volume (Docker Desktop supports hostPath)
|
|
sudo mkdir -p /data/stateful
|
|
sudo chmod 777 /data/stateful
|
|
|
|
echo "Preparation complete: Docker image built, tagged, and volume directory created."
|