Fosi Fossil Service
Small teams. Open source. Built on Fossil.

CaaS / Lamina

Unified Management for Fossil Repositories

Public | Owner: CaaS | Default branch: trunk | Last update: 2026-10-25 00:41

Artifact 27a5a2398ccb90accd6d6fe201a8a77aecb82e0d650cca9b7883b4e997666a3a:


(defmodule lamina_app
  (behaviour application)
  (export all))

(defun start (_start-type _start-args)
  ;; 已安装则启动时加载配置并重连平台数据库(否则仅 Setup 打开)
  (if (lamina_setup:installed?)
      (progn
        (lamina_config:reload)
        (case (lamina_db:open (lamina_config:get 'db_path "data/lamina.db"))
          (`#(ok ,_) 'ok)
          (`#(error ,reason)
           (logger:error "failed to open platform db: ~p" (list reason)))))
      'ok)
  (case (lamina_sup:start_link)
    (`#(ok ,sup)
     (case (nova_sup:add_application 'lamina #M(port 8827))
       (`#(ok ,_app ,_host ,_port)
        (logger:info "lamina routes registered on :8827")
        `#(ok ,sup))
       (`#(error ,reason)
        (logger:error "failed to register nova application: ~p" (list reason))
        `#(error ,reason))))
    (other
     (logger:error "lamina_sup failed to start: ~p" (list other))
     other)))

(defun prep-stop (state) state)

(defun stop (_state) 'ok)

Clone

You can clone this repository with the following command:

fossil clone https://fosi.dev/CaaS/Lamina

Contribute

The best way to contribute is through e-mail. See the project documentation for more details.