What Really Happens When You Type flisk up: A Sequence Diagram of Flisk

You type flisk up and a few seconds later your whole app is on localhost. This post shows the order of what happens in between, because the order tells you where a start can stop and which message to read when it does. The sequence follows what flisk up --help, flisk doctor and flisk up --dry-run print on Flisk 1.4.73, using the "Restaurant demo" starter (7 services, 3 stacks) with the Docker runtime. Some steps are summarised. Check an exact message against your own run before you rely on it. The sequence sequenceDiagram autonumber actor Dev as Developer participant CLI as flisk CLI participant Cfg as project.json + service.json participant Host as Host (Docker, ports, disk) participant Tilt as Tilt participant Dkr as Docker participant GW as Traefik gateway participant Svc as Services + shared Postgres Dev->>CLI: flisk up (or an agent calls up over MCP) CLI->>Cfg: read project, stacks, resources CLI->>CLI: version check

What Really Happens When You Type flisk up: A Sequence Diagram of Flisk

You type flisk up and a few seconds later your whole app is on localhost. This post shows the order of what happens in between, because the order tells you where a start can stop and which message to read when it does.

The sequence follows what flisk up --help, flisk doctor and flisk up --dry-run print on Flisk 1.4.73, using the "Restaurant demo" starter (7 services, 3 stacks) with the Docker runtime. Some steps are summarised. Check an exact message against your own run before you rely on it.

The sequence

sequenceDiagram
    autonumber
    actor Dev as Developer
    participant CLI as flisk CLI
    participant Cfg as project.json + service.json
    participant Host as Host (Docker, ports, disk)
    participant Tilt as Tilt
    participant Dkr as Docker
    participant GW as Traefik gateway
    participant Svc as Services + shared Postgres

    Dev->>CLI: flisk up (or an agent calls up over MCP)
    CLI->>Cfg: read project, stacks, resources
    CLI->>CLI: version check (pinnedFliskVersion, minFliskVersion)
    alt version not satisfied
        CLI-->>Dev: stop, say which version is needed
    end
    CLI->>Host: environment check (Docker, disk, Tilt, ports)
    alt host not ready
        CLI-->>Dev: stop, say what is wrong with the machine
    end
    CLI->>Host: pick free ports (80 to 8080, 443 to 8443, 5432 to 15433)
    CLI->>Cfg: compare generated files with service.json
    alt generated file was hand-edited
        CLI-->>Dev: stop, name the file
    end
    CLI->>Tilt: tilt up
    Tilt->>Dkr: build images
    Tilt->>Svc: start shared Postgres, then services in dependsOn order
    Tilt->>GW: start Traefik routes
    Svc-->>Tilt: health routes answer
    Tilt-->>CLI: resources ready or failed
    CLI-->>Dev: URLs and ports (or one JSON object with --json)
    Dev->>CLI: flisk status
    CLI-->>Dev: ready, pending or failed per resource
    Dev->>CLI: flisk down
    CLI->>Tilt: stop resources
    Tilt->>Dkr: remove containers

The steps that can stop you

Four checks run before or during a start. Each one tells you something different.

1. The version check. A project can pin the Flisk version it was made with (pinnedFliskVersion) or set a floor (minFliskVersion) in .flisk/project.json. If your CLI does not match, up stops before it touches anything. --ignore-version starts anyway.

2. The host check. This one is about the machine, not the project. On my laptop flisk doctor failed with "4.8 GiB free on this machine: building images needs at least 5 GiB", and it listed the cleanup commands (docker builder prune -f first, docker system prune -af as a last resort). It also checks that the Docker daemon runs, that Tilt is installed, and that the ingress ports are free.

3. The ports. Flisk wants 80, 443 and 5432. If they are taken it picks from a fallback range and says so: HTTP 8080, HTTPS 8443, Postgres 15433. To force the normal ones: FLISK_HTTP_PORT=80 flisk up. Read the printed URLs, because the port is part of them.

4. The drift check. If a generated file no longer matches service.json, someone edited it by hand. The start stops and names the file. The fix is upstream: change service.json, regenerate (flisk config regenerate), start again. --ignore-drift starts anyway, and your hand edit stays until the next regeneration.

Only after these does flisk up run tilt up. You can see that boundary yourself: flisk up --dry-run lists every service and URL it would start, prints the ports, and ends with "Would run: tilt up". Nothing is built.

After Tilt starts

Tilt builds the images, starts the shared Postgres and the services in dependsOn order, and routes them through a Traefik gateway. That is why you get names like http://api.flisk-restaurant-example.localhost:8080/api/menu/health instead of a list of random ports.

up can return before everything is healthy, because a build can take longer than one command. Two commands answer "is it ready":

flisk status
flisk up --json   # one JSON object when the stack is ready or the command fails

A failure in one service usually holds back the ones that depend on it. Read the logs of the first failed resource, not the last: flisk logs --json.

Where an agent fits

An agent does not replace this sequence. flisk mcp runs an MCP server over stdio, and the agent calls the same commands. The loop is: call up, poll status until ready, read the logs for any failure, then stop. The poll exists because up returns before readiness.

Stopping cleanly

flisk down reverses the lifecycle: Tilt stops the resources and Docker removes the containers. A stack left running keeps its ports, and the next up may refuse to start while an old Tilt still answers. flisk up --force kills the old Tilt first.

Summary

One flisk up is a short chain of checks before any container starts: version, host, ports, drift. Then Tilt builds and starts, and Traefik routes. Each check has its own message, and each message points at the fix. Read them in order, and most failed starts come down to the first line that failed.

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0