Getting Started
Turna runs from a single configuration file. A configuration can load external data, preprocess files, start HTTP/TCP entrypoints, and run local commands.
Install
Download the latest release binary for your platform.
sh
curl -fSL https://github.com/rakunlabs/turna/releases/latest/download/turna_Linux_x86_64.tar.gz | tar -xz --overwrite -C ~/bin/ turnaHomebrew is also supported.
sh
brew tap brew-tools/tap
brew install turnaFirst Config
Create turna.yaml in the directory where you run turna.
yaml
log_level: info
server:
entrypoints:
web:
address: ":8080"
http:
middlewares:
app:
service:
loadbalancer:
servers:
- url: "http://localhost:3000"
routers:
app:
path: /*
middlewares:
- appStart Turna.
sh
turna --config-fileRequests to http://localhost:8080/* are proxied to http://localhost:3000/*.
Static Files
Turna can also serve a folder directly.
yaml
server:
entrypoints:
web:
address: ":8080"
http:
middlewares:
files:
folder:
path: ./dist
index: true
spa: true
routers:
files:
path: /*
middlewares:
- filesRun Commands
Use services when Turna should also start local processes.
yaml
services:
- name: migrate
command: ./migrate.sh
order: 0
- name: app
command: ./app
depends:
- migrateNext Steps
- Read the configuration reference for load order and top-level sections.
- Read the server reference for entrypoints, routers, TLS, and middleware chains.
- Read the HTTP middleware index for all supported middleware keys.
- Read services for command execution and dependency behavior.