Run third-party services#
This section describes the launching of databases in docker containers. They must be launched before environment preparation and LP services.
InfluxDB#
Monitoring LUNA PLATFORM services requires running the Influx 2.0.8-alpine database. Below are the commands to launch the InfluxDB container.
For more information, see the "Monitoring" section in the administrator manual.
If necessary, you can configure the visualization of monitoring data using the LUNA Dashboards service, which includes a configured Grafana data visualization system. In addition, you can launch the Grafana Loki tool for advanced work with logs. See the instructions for launching LUNA Dashboards and Grafana Loki in the "Monitoring and logs visualization using Grafana" section.
Note: If necessary, you can use an external InfluxDB 2.0.8-alpine. In this case, you can skip the command below, but you will have to set custom settings for each LUNA PLATFORM service.
Use the docker run
command with these parameters:
docker run \
-e DOCKER_INFLUXDB_INIT_MODE=setup \
-e DOCKER_INFLUXDB_INIT_BUCKET=luna_monitoring \
-e DOCKER_INFLUXDB_INIT_USERNAME=luna \
-e DOCKER_INFLUXDB_INIT_PASSWORD=password \
-e DOCKER_INFLUXDB_INIT_ORG=luna \
-e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=kofqt4Pfqjn6o0RBtMDQqVoJLgHoxxDUmmhiAZ7JS6VmEnrqZXQhxDhad8AX9tmiJH6CjM7Y1U8p5eSEocGzIA== \
-v /etc/localtime:/etc/localtime:ro \
-v /var/lib/luna/influx:/var/lib/influxdb2 \
--restart=always \
--detach=true \
--network=host \
--name influxdb \
dockerhub.visionlabs.ru/luna/influxdb:2.0.8-alpine
PostgreSQL#
Note: If necessary, you can use an external PostgreSQL database. In this case, you can skip the command below and perform the actions from the section "External PostgreSQL configuration".
Use the following command to launch PostgreSQL.
docker run \
--env=POSTGRES_USER=luna \
--env=POSTGRES_PASSWORD=luna \
--shm-size=1g \
-v /var/lib/luna/postgresql/data/:/var/lib/postgresql/data/ \
-v /etc/localtime:/etc/localtime:ro \
--name=postgres \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/postgis-vlmatch:16
-v /var/lib/luna/current/example-docker/postgresql/data/:/var/lib/postgresql/data/
— The volume command enables you to mount the "data" folder to the PostgreSQL container. The folder on the server and the folder in the container will be synchronized. The PostgreSQL data from the container will be saved to this directory.
--network=host
— If you need to change the port for PotgreSQL, you should change this string to -p 5440:5432
. Where the first port 5440
is the local port and 5432
is the port used inside the container.
You should create all the databases for LP services manually if you are going to use an already installed PostgreSQL.
Redis#
Note: If you already have Redis installed, skip this step.
Note: It is recommended that you set a password when starting Redis for increased security. This can be done, for example, using the requirepass
parameter in the Redis configuration file, or passing the password via the Redis CLI. Next, you need to specify the password in the corresponding service settings, for example, in the "password" parameter of the "LUNA_ATTRIBUTES_DB" section of the Events service. See the official Redis documentation for more details.
Use the following command to launch Redis.
docker run \
-v /etc/localtime:/etc/localtime:ro \
--name=redis \
--restart=always \
--detach=true \
--network=host \
dockerhub.visionlabs.ru/luna/redis:7.2