Overview •
Supported Containers •
Prerequisites •
Usage
Configuration •
Directory Structure •
Logging •
Development
🔄 Automated Docker Container Upgrader for Maps4FS Deployment
A lightweight Docker container that automatically upgrades your Maps4FS deployment by pulling the latest images and redeploying containers
The Maps4FS Upgrader is a containerized tool designed to simplify the upgrade process of your Maps4FS deployment. It automatically:
- 🛑 Stops running Maps4FS containers
- 🗑️ Removes old containers and images
- 📥 Pulls the latest Docker images
- 🚀 Redeploys containers with updated configurations
- ⏱️ Handles proper startup sequencing
The upgrader manages the following Maps4FS containers:
- maps4fsapi - The core API service
- maps4fsui - The web user interface
- Docker installed and running
- Existing Maps4FS deployment with containers named
maps4fsapiandmaps4fsui - Access to Docker socket (
/var/run/docker.sock) USERPROFILEenvironment variable set (for volume mounting)
Run the upgrader with a single command:
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-e USERPROFILE="$HOME" \
iwatkot/maps4fsupgraderdocker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e USERPROFILE="$env:USERPROFILE" iwatkot/maps4fsupgrader- Connects to Docker daemon
- Stops maps4fsapi container
- Removes maps4fsapi container and image
- Pulls latest maps4fsapi image
- Deploys new maps4fsapi container
- Waits 10 seconds for API to start
- Repeats steps 2-5 for maps4fsui container
- Completes with success confirmation
The upgrader uses predefined container configurations that match the standard Maps4FS deployment:
- Image:
iwatkot/maps4fsapi - Port:
8000:8000 - Volumes: Maps4FS data directories + Docker socket
- Restart Policy:
unless-stopped
- Image:
iwatkot/maps4fsui - Port:
3000:3000 - Volumes: Maps4FS data directories + Docker socket
- Restart Policy:
unless-stopped
Expected Maps4FS directory structure:
$USERPROFILE/maps4fs/
├── mfsrootdir/ # Generated maps data
├── templates/ # Map templates
└── defaults/ # Default configurations
The upgrader provides detailed logging for each step:
- Container status checks
- Image pulling progress
- Deployment confirmations
- Error handling and troubleshooting
The upgrader includes robust error handling for:
- Docker daemon connection issues
- Missing containers or images
- Volume mounting problems
- Network connectivity issues
- Clone the repository:
git clone https://github.com/iwatkot/maps4fsupgrader.git
cd maps4fsupgrader- Install dependencies:
pip install -r requirements.txt- Run locally:
python maps4fsupgrader/main.py