Sign inSign up

tyroonis/lrm-node

By tyroonis

Updated over 1 year ago

This project provides the Light Reflective Mirror Node (LRM-Node)⁠ as a Docker container.

Image
Networking
Developer tools
0

1.6K

tyroonis/lrm-node repository overview

Light Reflective Mirror Node with Docker

This project provides the Light Reflective Mirror Node (LRM-Node) as a Docker container. It uses .NET 7, automatically downloads the tagged version of the LRM-Node, and dynamically generates the configuration file based on environment variables.

🚀 Installation & Usage

1️⃣ Build the Docker Image

Run the following command in the directory containing the Dockerfile:

docker build -t lrm-node .
2️⃣ Start the Container with .env File

Create a .env file with the desired configuration values (see below) and start the container:

docker run --env-file .env -p 7777:7777 -p 8080:8080 --name lrm-node-container lrm-node

Or run it in the background:

docker run -d --env-file .env -p 7777:7777 -p 8080:8080 --name lrm-node-container lrm-node
3️⃣ Start the Container with Manual Environment Variables
docker run -e AuthenticationKey=SuperSecure -e TransportPort=9999 -p 7777:7777 -p 8080:8080 --name lrm-node-container lrm-node
4️⃣ View Container Logs
docker logs -f lrm-node-container
5️⃣ Stop and Remove the Container
docker stop lrm-node-container && docker rm lrm-node-container

📝 .env File Example

Save this file as .env in the project directory:

TransportClass=kcp2k.KcpTransport
AuthenticationKey=Secret Auth Key
TransportPort=7777
UpdateLoopTime=10
UpdateHeartbeatInterval=100
RandomlyGeneratedIDLength=5
RandomlyGeneratedIDChars=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw
UseEndpoint=true
EndpointPort=8080
EndpointServerList=true
EnableNATPunchtroughServer=true
NATPunchtroughPort=7776
UseLoadBalancer=false
LoadBalancerAuthKey=AuthKey
LoadBalancerAddress=127.0.0.1
LoadBalancerPort=7070
LoadBalancerRegion=1

📌 Usage with docker-compose

1️⃣ Create docker-compose.yml

Create a file named docker-compose.yml with the following content:

version: '3.8'

services:
  lrm-node:
    build: .
    container_name: lrm-node-container
    env_file: .env
    ports:
      - "7777:7777"
      - "8080:8080"
    restart: unless-stopped
2️⃣ Start docker-compose

Build and start the container with:

docker-compose up -d
3️⃣ Stop and Remove docker-compose Containers
docker-compose down

🎯 Conclusion

With this setup, you can easily run the LRM-Node as a Docker container. You can use either docker run or docker-compose, depending on what best fits your setup. 🚀

Tag summary

Content type

Image

Digest

sha256:7992117d4

Size

77.1 MB

Last updated

over 1 year ago

docker pull tyroonis/lrm-node