Skip to content

Deploy Mideye Server 5 with Docker and Docker Compose

Deploy Mideye Server 5 as a Docker container for easy scaling, portability, and simplified upgrades. This guide covers docker-compose configuration, MariaDB integration, persistent volume setup, and container lifecycle management.

What this guide covers:

  • Docker Compose configuration (v2 and v3 syntax)
  • MariaDB database container setup
  • Persistent volumes for config and database
  • Backup and restore procedures
  • Upgrading to new versions

Docker image is available at dockerhub

To run MideyeServer a machine with working docker service and docker-compose is required.

Copy the following into a file called docker-compose.yml

=== “v2” yaml version: '2' services: mideyeserver-app: image: mideye/mideyeserver:5.6.2-final environment: - SPRING_PROFILES_ACTIVE=prod - SPRING_DATASOURCE_URL=jdbc:mariadb://mideyeserver-mariadb:3306/mideyeserver - JHIPSTER_SLEEP=10 # gives time for the database to boot before the application - SERVER_SSL_ENABLED=true - SERVER_PORT=8443 healthcheck: test: ["CMD", "curl", "--insecure","-sS", "https://localhost:8443/management/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s ports: - 8443:8443/tcp - 1812:1812/udp depends_on: - mideyeserver-mariadb volumes: - mideye_config:/home/mideye/config mideyeserver-mariadb: image: mariadb:10.5.8 environment: - MYSQL_USER=root - MYSQL_ALLOW_EMPTY_PASSWORD=yes - MYSQL_DATABASE=mideyeserver volumes: - mideye_db:/var/lib/mysql volumes: mideye_config: mideye_db: === “v3” yaml version: '3' services: mideyeserver-app: image: docker.io/mideye/mideyeserver:5.6.2-final environment: SPRING_PROFILES_ACTIVE: prod SPRING_DATASOURCE_URL: jdbc:mariadb://mideyeserver-mariadb:3306/mideyeserver JHIPSTER_SLEEP: 10 # gives time for the database to boot before the application SERVER_SSL_ENABLED: true SERVER_PORT: 8443 healthcheck: test: ["CMD", "curl", "--insecure","-sS", "https://localhost:8443/management/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s ports: - "8443:8443/tcp" - "1812:1812/udp" depends_on: - mideyeserver-mariadb volumes: - mideye_config:/home/mideye/config mideyeserver-mariadb: image: docker.io/library/mariadb:10.5.8 environment: MYSQL_USER: root MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: mideyeserver volumes: - mideye_db:/var/lib/mysql volumes: mideye_config: mideye_db:

  • Start MideyeServer: docker compose -p mideye up -d
  • Stop MideyeServer: docker compose -p mideye stop
  • Restart MideyeServer: docker compose -p mideye restart
  • MideyeServer Logs: docker logs mideye_mideyeserver-app_1

  • Backup MideyeServer Config: docker cp mideye_mideyeserver-app_1:/home/mideye/config .(remember the last . which means current directory)
  • Backup MideyeServer Database: docker exec mideye_mideyeserver-mariadb_1 sh -c 'exec mysqldump --all-databases' > mideyeserver-databases.sql

  • Restore MideyeServer Config:
    • docker cp config/application-prod.yml mideye_mideyeserver-app_1:/home/mideye/config/application-prod.yml
    • docker cp config/keystore.p12 mideye_mideyeserver-app_1:/home/mideye/config/keystore.p12
  • Restore MideyeServer Database: docker exec -i mideye_mideyeserver-mariadb_1 sh -c 'exec mysql' < mideyeserver-databases.sql
  • Restart MideyeServer After Restore: docker compose -p mideye restart

Check the MideyeServer logs to get the SETUP CHALLENGE.

docker logs mideye_mideyeserver-app_1 | grep 'SETUP CHALLENGE' | tail -1 | awk 'NF>1{print $NF}'

Connect to the webgui through a browser with url: https://localhost:8443

If a new RADIUS Server is added in MideyeServer. Please restart the application and add a new port to docker-compose.yml

  • 8443 is used for the webgui
  • 1812/UDP is used for radius traffic.
  • Setup a range of ports - 1812-1818:1812-1818/udp

To keep configuration persistent between updates, the following persistent volumes are configured.

  • mideye_config: contains certificates and application config
  • mideye_db contains all configuration that is added from the webgui.
  1. Change the image from image: mideye/mideyeserver:5.5.6-final to image: mideye/mideyeserver:5.6.0-final in docker-compose.yml
  2. Stop the service docker compose -p mideye down
  3. Start the service docker compose -p mideye up -d