allgreed / lmap-forever

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lmap-forever

Backing service for lmap, designed for running locally and storing the state

Installation

Home-manager

The recommended installation methid is using home-manager, simply copy the following into your home.nix and modify the values between { and }:

  systemd.user.services = {
    lmap-forever = {
      Unit = {
        Description = "lmap-forever";
        Documentation = [
          "https://github.com/allgreed/lmap-forever"
          "https://github.com/allgreed/lmap"
        ];
      };

      Install = {
        WantedBy = [ "default.target" ];
      };

      Service = {
        TimeoutStartSec = 0;
        Restart = "always";
        ExecStartPre="/bin/sh -c 'export PATH=/run/current-system/sw/bin/:/usr/bin/; docker stop lmap-forever && (docker rm lmap-forever || true) || true'";
        ExecStart="/bin/sh -c 'export PATH=/run/current-system/sw/bin/:/usr/bin/; docker run -e STORAGE_PROVIDER_TYPE=file -e STORAGE_PROVIDER_FILE_PATH=/data -v /home/{your_username}/lmap:/data --rm --name lmap-forever -p 12694:12694 allgreed/lmap-forever:{tag_of_your_choice}'";
      };
    };
  };

Docker

but of course you can use it simply via Docker as well:

docker run -e STORAGE_PROVIDER_TYPE=file -e STORAGE_PROVIDER_FILE_PATH=/data -v /home/{your-username}/lmap:/data --restart=always --name lmap-forever -p 12694:12694 allgreed/lmap-forever:{tag_of_your_choice}

Note on tags

The list of tags can be found here TODO: setup CI and change the default tag to latest

Note on ports

By default port 12694 is utilized, not the most memorable one, but it's not reserved by IANA or anything

Dev

Prerequisites

Hint: if something doesn't work because of missing package please add the package to default.nix instead of installing on your computer. Why solve the problem for one if you can solve the problem for all? ;)

One-time setup

make init

Everything

make help

About


Languages

Language:Python 63.3%Language:Nix 20.1%Language:Makefile 16.7%