mappDatabase establishes a connection between B&R PLC and database systems. It can be used to retrieve, update, delete
information, and much more. Supports MySQL, MSSQL, and PostgreSQL databases.
More information about mappDatabase: BR help
Get started with a minimal working example:
docker run --name mappdb -d -p 85:85 th0masis/mappdatabase:latest
The mappDatabase port must be exposed because it enables communication with the PLC. Different database types use different default ports.
PostgreSQL Example (Default)
docker run --name mappdatabase-01 --restart=always -d -p 85:85 -p 5432:5432 -e DB_PORT=5432 -e DB_HOST=localhost -e POLL_INTERVAL=20 th0masis/mappdatabase:latest
MySQL on Same Machine
If the database is on the same machine as the Docker container, you don't need to expose the MySQL port (3306):
docker run --restart=always --name mappdatabase-01 -d -p 86:85 -e DB_TYPE=mysql -e POLL_INTERVAL=60 th0masis/mappdatabase:5_12
MySQL on Remote Machine
If the database is on a remote machine, you need to expose the port for the container:
docker run --restart=always --name mappdatabase-01 -d -p 85:85 -p 3306:3306 -e DB_HOST=192.168.1.123 -e DB_TYPE=mysql -e POLL_INTERVAL=60 th0masis/mappdatabase:5_12
Automation Studio 6 Example
The 6_0 version is compatible with B&R Automation Studio 6:
docker run --name mappdatabase-01 --restart=always -d -p 55002:85 -e DB_HOST=localhost -e POLL_INTERVAL=20 th0masis/mappdatabase:6_0
Environment Variables - Version 5_12
| Variable | Default Value | Description |
|---|---|---|
| APP_PORT | 85 | Port for mappDatabase in PLC |
| DB_HOST | localhost | Hostname or IP address of the database server |
| DB_PORT | 3306 | Port of the database server |
| DB_TYPE | mysql | Database type: mysql, mssql, or postgres |
| POLL_INTERVAL | 60 | Interval (seconds) for polling the database |
Environment Variables - Version 6
| Variable | Default Value | Description |
|---|---|---|
| APP_PORT | 85 | Port for mappDatabase in PLC |
| DB_HOST | localhost | Hostname or IP address of the database server |
| DB_PORT | 3306 | Port of the database server |
| POLL_INTERVAL | 60 | Interval (seconds) for polling the database |
Note: Version 6 does not support the DB_TYPE environment variable.
Content type
Image
Digest
sha256:cff3a513f…
Size
48.8 MB
Last updated
11 months ago
docker pull th0masis/mappdatabase