Build from source
The build produces a single executable file, static (no system dependencies, no CGO), containing server, APIs, panel and public page.
Prerequisites
Section titled “Prerequisites”| 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.
-
Clone the repository:
Finestra del terminale git clone https://github.com/coste360/arenile.gitcd arenile -
Install the dependencies (once):
Finestra del terminale make setup -
Build the two web applications and the binary:
Finestra del terminale make buildmake buildbuilds the panel and the public page, embeds them in the binary (internal/http/static) and producesbin/arenile. -
Check:
Finestra del terminale ./bin/arenile version
Building for another architecture
Section titled “Building for another architecture”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:
make web-buildCGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath \ -ldflags "-s -w -X main.version=dev" -o arenile-arm64 ./cmd/arenileBuilding the Docker image locally
Section titled “Building the Docker image locally”make docker # produces ghcr.io/coste360/arenile:devRunning the binary
Section titled “Running the binary”ARENILE_DEV=true ARENILE_DATA_DIR=./data ./bin/arenile serveIn 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.
[Unit]Description=ArenileAfter=network-online.target
[Service]User=arenileEnvironmentFile=/etc/arenile/arenile.envExecStart=/usr/local/bin/arenile serveRestart=on-failureNoNewPrivileges=trueProtectSystem=strictReadWritePaths=/var/lib/arenile
[Install]WantedBy=multi-user.targetIn /etc/arenile/arenile.env set at least ARENILE_BASE_URL, ARENILE_SECRET_KEY and
ARENILE_DATA_DIR=/var/lib/arenile (permissions 600). Every variable is in
Configuration.
Binary commands
Section titled “Binary commands”arenile serve [--dev] start the server (automatic migrations with ARENILE_AUTO_MIGRATE=true)arenile migrate up|status apply or show the state of migrationsarenile 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 establishmentarenile backup --out FILE consistent backup (SQLite)arenile restore --in FILE restore a backup (server stopped)arenile version show the versionConfiguration is always read from the ARENILE_* and DATABASE_URL environment variables.

