Skip to content
Snippets Groups Projects
Commit 5edbbeca authored by Tim Schoof's avatar Tim Schoof Committed by Sergey Yakubov
Browse files

Create logs database on influxdb startup

The network mode is changed to bridge because the influxdb image
entrypoint script uses hardcoded ports for the influxdb instance it
starts before executing the setup scripts
parent 0774493a
No related branches found
No related tags found
No related merge requests found
set -x
influx -execute "CREATE DATABASE logs"
......@@ -30,15 +30,17 @@ job "monitoring" {
driver = "docker"
user = "${asapo_user}"
config {
network_mode = "host"
network_mode = "bridge"
security_opt = ["no-new-privileges"]
userns_mode = "host"
image = "influxdb:${influxdb_version}"
volumes = ["/${service_dir}/influxdb:/var/lib/influxdb"]
volumes = [
"/${service_dir}/influxdb:/var/lib/influxdb",
"local/influxdb:/docker-entrypoint-initdb.d"]
command = "influxd"
}
env {
PRE_CREATE_DB="asapo_receivers;asapo_brokers"
INFLUXDB_BIND_ADDRESS="127.0.0.1:$${NOMAD_PORT_influxdb_rpc}"
INFLUXDB_HTTP_BIND_ADDRESS=":$${NOMAD_PORT_influxdb}"
}
......@@ -70,6 +72,10 @@ job "monitoring" {
}
}
template {
source = "${scripts_dir}/influxdb/create_db_logs.sh.tpl"
destination = "local/influxdb/create_db_logs.sh"
}
} #influxdb
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment