Skip to content
ArenileArenile
Coste360.itCoste360.it

Build from source

The build produces a single executable file, static (no system dependencies, no CGO), containing server, APIs, panel and public page.

Tool Version
Go 1.27 or later
Node.js and npm Node 22 or later, npm 10 or later
make any recent version
git to clone the repository

Alternatively use the devcontainer included in the repository (VS Code, GitHub Codespaces): it has everything.

  1. Clone the repository:

    Finestra del terminale
    git clone https://github.com/coste360/arenile.git
    cd arenile
  2. Install the dependencies (once):

    Finestra del terminale
    make setup
  3. Build the two web applications and the binary:

    Finestra del terminale
    make build

    make build builds the panel and the public page, embeds them in the binary (internal/http/static) and produces bin/arenile.

  4. Check:

    Finestra del terminale
    ./bin/arenile version

The binary is pure Go: you can build it for a Raspberry Pi or an arm64 server from any computer, after building the web applications with make web-build:

Finestra del terminale
make web-build
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath \
-ldflags "-s -w -X main.version=dev" -o arenile-arm64 ./cmd/arenile
Finestra del terminale
make docker # produces ghcr.io/coste360/arenile:dev
Finestra del terminale
ARENILE_DEV=true ARENILE_DATA_DIR=./data ./bin/arenile serve

In development mode ARENILE_BASE_URL is optional and, if ARENILE_SECRET_KEY is missing, a key is generated, saved in ./data/dev-secret.key and shown once at startup. Never in production.

arenile serve [--dev] start the server (automatic migrations with ARENILE_AUTO_MIGRATE=true)
arenile migrate up|status apply or show the state of migrations
arenile admin create --email E --name N --org O [--password P]
create an owner user (password from ARENILE_ADMIN_PASSWORD or prompted)
arenile seed demo load the demo establishment
arenile backup --out FILE consistent backup (SQLite)
arenile restore --in FILE restore a backup (server stopped)
arenile version show the version

Configuration is always read from the ARENILE_* and DATABASE_URL environment variables.