#!/bin/bash

cd "$(dirname "$0")"

# Load the jobarg server mysql docker container
docker load -i *.tar.gz

# Run container with host networking
docker run --name jobarg-server-mysql \
           -e ZBX_DB_SERVER_HOST="127.0.0.1" \
           -e MYSQL_ZBX_DATABASE="zabbix" \
           -e MYSQL_ZBX_DB_USER="zabbix" \
           -e MYSQL_ZBX_DB_PASSWORD="zabbix" \
           -e JAZ_DB_SERVER_HOST="127.0.0.1" \
           -e MYSQL_JAZ_DATABASE="jobarranger" \
           -e MYSQL_JAZ_DB_USER="zabbix" \
           -e MYSQL_JAZ_DB_PASSWORD="zabbix" \
           -e JAZABBIXURL="http://127.0.0.1/zabbix" \
           -e LOGTYPE="file" \
           -e DEBUGLEVEL=3 \
           -v /tmp:/tmp:rw \
           -v /etc/localtime:/etc/localtime:ro \
           -p 0.0.0.0:10061:10061 \
           -d jobarg-server-mysql:rhel9-6.2.2
           
