Azure Deployment Quick Reference
What You Need to Transfer (Total: ~1-2 MB)
docker-export/
├── postgres_data.tar.gz (your database)
└── fcrepo_data.tar.gz (your collections)
Root files:
├── docker-compose.yml
├── .env
├── .env.example (optional template)
├── fcrepo.properties
├── prometheus.yml
└── scripts/
3-Step Deployment Process
Step 1: On Azure VM (First Login)
# Download setup script
curl -o setup-azure-vm.sh https://raw.githubusercontent.com/Rob142857/fedoraMJWArtist/main/scripts/setup-azure-vm.sh
# Or manually:
ssh azureuser@<azure-vm-ip>
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo apt-get update
sudo apt-get install -y docker-compose-plugin
# Logout and back in
exit
ssh azureuser@<azure-vm-ip>
# Create directory
mkdir -p ~/fedoraMJWArtist
# If `.env` is not present (or you want to reset it), start from the template:
cd ~/fedoraMJWArtist
test -f .env || cp .env.example .env
Step 2: Transfer Files (From Local Machine)
# Edit scripts/transfer-to-azure.ps1 with your VM IP, then run:
# Replace <azure-vm-ip> with your actual IP
scp docker-export/*.tar.gz azureuser@<azure-vm-ip>:~/fedoraMJWArtist/
scp docker-compose.yml .env .env.example fcrepo.properties prometheus.yml azureuser@<azure-vm-ip>:~/fedoraMJWArtist/
scp -r scripts azureuser@<azure-vm-ip>:~/fedoraMJWArtist/
Step 3: Restore and Start (On Azure VM)
ssh azureuser@<azure-vm-ip>
cd ~/fedoraMJWArtist
bash scripts/restore-on-azure.sh
The script will:
- Create Docker volumes
- Restore your data
- Pull Docker images from Docker Hub
- Start all services
- Verify everything is running
Verification
# Check containers
docker ps
# Test Fedora
curl -u curator1:ChangeThisCuratorPassword789! http://localhost:8080/fcrepo/rest/
# Check your collections
curl -u curator1:ChangeThisCuratorPassword789! http://localhost:8080/fcrepo/rest/paintings
After Deployment
- Install Cloudflare Tunnel - See docs/azure-quick-deploy.md Step 9
- Change curator1 password - Update .env and restart
- Set up backups - Cron job for volume backups
- Enable auto-start -
sudo systemctl enable docker
Total Time: ~15 minutes
- VM setup: 5 min
- File transfer: 1 min
- Restore & start: 5 min
- Verification: 2 min
- Cloudflare Tunnel: 2 min
Troubleshooting
# View logs
docker logs mjw-fedora --tail 50
docker logs mjw-db --tail 50
# Restart a container
docker restart mjw-fedora
# Check volumes
docker volume ls
docker run --rm -v postgres_data:/data alpine ls -la /data
# Stop everything
docker-compose down
# Start fresh
docker-compose up -d