Repository navigation
Moorage 0.4.0
Moorage 0.4.0 gives every branch a place of its own, and says who can reach it. Push a branch and it gets its own build, address and data, which sleeps when nobody is using it and goes when its branch does. Staging, promoting what it runs to production, and locks come with it. Each environment can be open, behind a password, for those signed in, or only for people with a share link. Apps can have domains of their own, and belong to projects, in which people have roles, with an audit log of who did what.
Upgrading from 0.3.0 needs no steps of its own: replace moor and restart the server, and running apps are taken over without a restart. Three things behave differently:
- Pushing a branch other than the default now deploys it, as a preview.
enabled = falsein[previews]keeps branches as they were. - Previews are for those signed in with a role in the app's project. To share them with people who have no account, make a share link, or set
preview = "public"under[access]inserver.toml. - New servers set up as you keep everything in
~/.moorageon macOS and Linux. A server that already exists is found where it is.
Added
- Access gates (wave 4, slice 6). Each environment can be open to anyone, behind a shared password, for those signed in to Moorage, whom the app hears named in
X-Moorage-Userand its fellows, or only for people with a share link, with a list of addresses on top of any of them.moor access,moor share, an Access tab in the console,accessin the manifest and[access]inserver.toml. Previews are for those signed in with a role, unless you say otherwise: if you share previews with people who have no account, setpreview = "public"under[access]inserver.toml, or make a share link. - Your own domains, and paths (wave 4, slice 7).
moor domains add portal.example.com, which serves once its DNS points here, ortools.example.com/reports, so that several apps share a hostname. Androuting = "path", for servers with no wildcard DNS: apps at/<app>/, with a console on its own hostname. X-Moorage-Proxy-Token, which an app that does not trust what else runs on its machine can check against$MOORAGE_PROXY_TOKEN, to know that a request came through Moorage.- Sleep and wake (wave 4, slice 5). An environment left idle stops its instances, and the next request starts them and waits: a browser gets a page that says it is waking up, and reloads itself. Previews do it after 30 minutes unless told otherwise, and others with
sleep_afterin[environments.NAME].sleep = falsekeeps a process running,moor sleepandmoor wakedo it by hand, and it stays asleep across a restart of the server. - Previews (wave 4, slice 4). Push a branch, and it gets its own build at its own address,
shop--my-branch.apps.example.com, with production's variables (except those set--production-only), its own empty data directory andnoindex. Deleting the branch destroys it, and so does going unused for seven days, unless it is pinned. Previews in the console andmoor previewshave them all. If you push other branches to a Moorage remote today, note that they will now deploy:enabled = falsein[previews]keeps them as they were. - Named environments.
[environments.staging]with a branch,moor environments create, ormoor deploy --env staging: a place that stays, with its own address, variables and data. Every page of an app in the console and every command with--envworks on them. moor promote --from staging. Releases the exact build one environment runs to another, in seconds, and warns if it was built with other build variables.moor lockandmoor unlock. Stop deployments to an environment, so that the next push does not replace a rollback. A rollback's page offers it.- Renaming and deleting apps (wave 4, slice 3).
moor apps rename,moor apps delete, and an app's Settings page, which also moves it to another project. Renaming moves everything of it and starts it again under the new name. Deleting says how much room each part takes, asks for its name, and can keep its data directory.moor apps infoandGET /api/v1/apps/{app}say how much room an app takes. - Projects and roles (wave 4, slice 2). Apps belong to projects, and people have roles in them: viewers see an app and its logs, deployers also deploy, restart, roll back and scale, and maintainers also change its variables and the project's members. Those with no role cannot tell its apps exist. An upgrade changes nothing: every app goes in a
defaultproject where everyone is a maintainer, until you say otherwise.moor projects,moor apps create --project,moor apps move, and a Projects page; the console shows what your role allows. See Projects and roles. - The audit log. Every change through the API or the console, every sign-in, push and secret revealed, kept for a year, with who, from where, what to, and how it went.
moor audit,GET /api/v1/audit, and Settings for administrators. - Revealing a secret.
moor env reveal NAME, and a button for maintainers. It shows the value once, and is recorded.
Fixed
- A tab in the address after signing in could send you to another site. The
nextof the sign-in page now refuses anything a browser would take away before looking. X-Real-IPsaid what a client claimed behind a proxy, rather than what the proxy saw. It now goes by the nearest address that is not a trusted proxy.- Headers such as
X_Moorage_Userreached apps that read an underscore as a dash. They are now removed.
Changed
~/.moorageis the default home (wave 4, slice 1). Set up as yourself on macOS or Linux, a server keepsserver.tomlanddata/in~/.moorage, andmooritsconfig.toml: one folder, the same on both, short to type. An existing server stays where it is, andmoorfinds it.XDG_CONFIG_HOMEandXDG_DATA_HOMEstill win on Linux, if they are set. Servers set up as root and Windows have not moved.