2. Installation - RealDeviceMap/RealDeviceMap GitHub Wiki
Requirements
RealDeviceMap can run anywhere and doesn’t need to be run on MacOS. It doesn’t even need to run in the same network, so you can run RDM on a VPN or similar.
- Docker https://docs.docker.com/engine/install/ubuntu/
- docker-compose if not included already) https://docs.docker.com/compose/install/compose-desktop/
- At least one MITM Device-Controller (GC, GDS, Atlas, RDM-UI)
- Existing MySQL Database and user(s), (MySQL 8 or MariaDB 10.5+), or you can use the included database included in the docker.
Installation
This guide assumes you have the requirements installed.
RDM Setup Process using Docker
Proceed to setup
- Create a new folder for your compose file for RealDeviceMap:
mkdir rdm
- Navigate into your new folder:
cd rdm
- Download the .yml file.
wget https://raw.githubusercontent.com/RealDeviceMap/RealDeviceMap/master/docker-compose.yml
Edit the .yml file with your information:
Docker DB Version
If you are using the RDM included docker database
Edit the values for
DB_DATABASE
- your database nameDB_USERNAME
- db usernameDB_PASSWORD
- db user passwordDB_ROOT_USERNAME
- root userDB_ROOT_PASSWORD
- root user password
Recommend using rdmuser as the username and a secure password. The username and password should match in both sections.
Edit the value for MYSQL_ROOT_PASSWORD
to a secure password for the root user.
Everything else can stay at default
If you run a database on port 3306 already (and not using it for this project): edit 3306:3306 to 3307:3306 for example. The db will then be accessible on the host (localhost) at port 3307
Start the docker Database Server:
docker-compose up -d db
External DB Version
If you are using an existing database that is external to docker
Edit the values for
DB_HOST
DB_DATABASE
DB_ROOT_USERNAME
DB_ROOT_PASSWORD
DB_USERNAME
DB_PASSWORD
to match your existing database configuration.
Remove or comment out the following lines/sections below (these are for a docker DB) in the docker-compose.yml:
depends_on:
- db
...
# db:
# image: mysql
# command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
# container_name: realdevicemap-db
# restart: unless-stopped
# environment:
# MYSQL_ROOT_PASSWORD: YourStrongRootPassw0rd!
# MYSQL_DATABASE: rdmdb
# MYSQL_USER: rdmuser
# MYSQL_PASSWORD: YourStrongPassw0rd!
# ports:
# - 3306:3306
# volumes:
# - data:/var/lib/mysql
# - /etc/localtime:/etc/localtime:ro
Don't forget to add following lines in your yml file, so your RDM can access your DB on host:
extra_hosts:
- "host.docker.internal:host-gateway"
Start the RealDeviceMap Server
Don’t add -d
the first time so we can get the token:
docker-compose up rdm
Visit http://localhost:9000/ (or whatever the server ip/hostname to your server is) and create an admin account with the access-token you see in the output of that command in terminal.
The map will start at 0,0 (blue ocean)
Click Dashboard -> Settings
and edit the start location
RDM is now running on your system
(you can now press Ctrl-C
to stop in attached mode and start it again with:
docker-compose up -d rdm
Database Event Scheduler
- alternative to the RDM database clearer which is enabled per default
- don't use database event scheduler and RDM database clearer at same time
- keep your tables which are growing with history clean (e.g. pokemon, incident, ...)
- use e.g. MySQL Event Scheduler - don't forget to enable it in mysql config
event_scheduler = on
- example queries are provided in Scripts folder, adapt them for your usage, check the query carefully before executing.