Sign inSign up

anikber/epic-lore-server

By anikber

•Updated 4 months ago

Lore - is an open source version control system.

Image
Integration & delivery
Developer tools
0

38

anikber/epic-lore-server repository overview

logo

⁠Lore

⁠The author is not responsible for any potential consequences associated with the use of this project.

⁠Use at your own risk.

Next-generation open source version control

Download Lore⁠  ·  Quickstart⁠  ·  Read the docs⁠  ·  Join the conversation⁠

⁠Lore's repositories

Lore spans a family of repositories: the core library, server, and CLI in this repository, plus a software development kit (SDK) for each supported language.

RepositoryDescriptionLink
Lore Library, Server & CLIThe core Lore library, the Lore Server, and the Lore CLI. You are here.View on GitHub⁠
JavaScript SDKThe JavaScript binding for the Lore API.View on GitHub⁠
Python SDKThe Python binding for the Lore API.View on GitHub⁠
C# SDKThe C# binding for the Lore API.View on GitHub⁠
Go SDKThe Go binding for the Lore API.View on GitHub⁠

⁠docker-compose.yml

networks:
  lore-net:
    driver: bridge
    name: lore-net

  internal:
    driver: bridge
    internal: true

volumes:
  lore-data:
    driver: local
  lore-certs:
    driver: local

services:
  # ------------------------------------------------------------
  # HELPER SERVICE: TLS CERTIFICATE GENERATION
  # ------------------------------------------------------------
  cert-gen:
    image: alpine:3.19
    container_name: lore-cert-gen
    restart: "no"        # Run once and exit
    user: root
    command: >
      sh -c '
        if [ ! -f /certs/cert.pem ] || [ ! -f /certs/key.pem ]; then
          echo "Generating self-signed QUIC certificate..."
          openssl req -x509 -newkey rsa:2048 -nodes \
            -keyout /certs/key.pem \
            -out /certs/cert.pem \
            -days 365 \
            -subj "/CN=localhost" \
            -addext "subjectAltName=IP:127.0.0.1,DNS:localhost"
          chown ${UID:-1000}:${GID:-1000} /certs/*.pem
          echo "Certificates generated successfully."
        else
          echo "Certificates already exist. Skipping generation."
        fi
      '
    volumes:
      - ./certs:/certs   # Host directory used to store certificates

    # Network connection is optional, but included for consistency
    networks:
      - internal

  # ------------------------------------------------------------
  # MAIN LORE SERVER
  # ------------------------------------------------------------
  lore-server:
    image: anikber/epic-lore-server:v0.8.3
    container_name: lore-server
    restart: unless-stopped

    # Start only after certificates have been successfully generated
    depends_on:
      cert-gen:
        condition: service_completed_successfully

    # Run the container with the host user's UID/GID
    # so files created in ./data have the correct ownership
    user: "${UID:-1000}:${GID:-1000}"

    # Expose only the required ports
    ports:
      - "41337:41337/tcp"
      - "41337:41337/udp"
      - "41339:41339/tcp"

    # Mount persistent volumes
    volumes:
      # Persistent data storage
      - ./data:/data

      # TLS certificates (read-only)
      - ./certs/cert.pem:/etc/lore/cert.pem:ro
      - ./certs/key.pem:/etc/lore/key.pem:ro

      # Server configuration
      - ./config/local.toml:/etc/lore/config/local.toml:ro

    # Networks
    networks:
      - internal
      - lore-net

    # Health check endpoint
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:41339/health_check"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s

.env

# UID and GID of the host user who will own the data directory.
# You can find them by running:
#   id -u
#   id -g
UID=1000
GID=1000

Tag summary

Content type

Image

Digest

sha256:978e4bfb5…

Size

91.3 MB

Last updated

4 months ago

docker pull anikber/epic-lore-server:v0.8.3