HGRC Quarry Fossil Service
Simple tools for lasting software

Infrastructure as a Service / Nemoptera

A solid foundation to fork, tweak, and enhance.

Public | Owner: Infrastructure as a Service | Default branch: trunk | Last update: 2026-11-08 15:31

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:build(docker): 添加 Dockerfile 与容器化配置文件
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: a179294576bc8a2eb72819a2d5df9264854ec057f3d78a2e8664d55d68f7bf03
User & Date: pluto 2026-11-08 15:31:13.432
Context
2026-11-08
15:31
build(docker): 添加 Dockerfile 与容器化配置文件 Leaf check-in: a179294576 user: pluto tags: trunk
15:25
refactor(core): 重命名项目为 Nemoptera check-in: 14d905c889 user: pluto tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added .dockerignore.
































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
_build
_build/**
data
data/**
docs
docs/**
.fslckout
.fossil-settings
*.beam
*.o
*.dump
rebar3.crashdump
erl_crash.dump
.DS_Store
**/.DS_Store
.git
Added Dockerfile.






























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# syntax=docker/dockerfile:1

# ---------------------------------------------------------------------
# Stage 1: Build application and dependencies
# ---------------------------------------------------------------------
FROM erlang:27-slim AS builder

WORKDIR /build

# Install build tools for compiling C NIFs (esqlite) and git for dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        build-essential \
        git && \
    rm -rf /var/lib/apt/lists/*

# Cache dependency retrieval
COPY rebar.config rebar.lock ./
RUN rebar3 get-deps

# Copy configurations and source files
COPY config/ config/
COPY src/ src/

# Compile the application (rebar3 + rebar3_lfe)
RUN rebar3 compile

# ---------------------------------------------------------------------
# Stage 2: Runtime environment
# ---------------------------------------------------------------------
FROM erlang:27-slim

# Install runtime dependencies:
# - fossil: Fossil SCM binary managed by Nemoptera
# - git: Required for fossil git export / mirror synchronization
# - ca-certificates: Required for HTTPS operations (remote clone / sync)
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        fossil \
        git \
        ca-certificates && \
    rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy compiled application, beam files, and priv directories (NIFs)
COPY --from=builder /build/_build/default/lib /app/_build/default/lib
COPY --from=builder /build/config /app/config
COPY --from=builder /build/src /app/src

# Setup entrypoint script and data directory
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh && \
    mkdir -p /app/data/repos /app/data/fossil-home

# Expose HTTP port
EXPOSE 8731

# Data persistence volume
VOLUME ["/app/data"]

ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD ["erl", "-config", "config/sys.config", "-pa", "_build/default/lib/*/ebin", "-eval", "application:ensure_all_started(nemoptera)", "-noshell"]
Added docker-entrypoint.sh.














>
>
>
>
>
>
>
1
2
3
4
5
6
7
#!/bin/sh
set -e

# Ensure data directory structure exists
mkdir -p /app/data/repos /app/data/fossil-home

exec "$@"

Clone

You can clone this repository with the following command:

fossil clone https://hgrc.dev/IaaS/Nemoptera Nemoptera.fossil

Contribute

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