Running two services locally is easy. Running ten is a different job. Nothing is hard on its own, but the small failures stack up, and they all look like "it just doesn't start". Here are ten that show up again and again, with the check that catches each.
1. The disk fills up first
Image builds need room. A laptop with a few GiB free will fail halfway through a build with an error that never mentions disk. Run flisk doctor before the first start: it reports free space and the cleanup commands. Start with docker builder prune -f. Use docker system prune -af only as a last resort, because it removes images you may still want.
2. A port is already taken
Port 5432 is the classic: a Postgres you forgot about is already listening. Flisk falls back to a free range (HTTP 8080, HTTPS 8443, Postgres 15433) and prints the URLs. Read the URLs it prints, because the port is part of them.
3. Everything starts at once
Ten services starting together will fight for CPU and memory, and the API will boot before the database is ready. Declare dependsOn so the order is explicit.
4. The database is "up" but not ready
A container that has started is not a database that accepts connections. Wait on readiness, not on the process.
5. Migrations run inside the app
Every restart runs them again, and two instances can run them at once. Give migrations their own step that runs once, before the API.
6. Hand-edited generated files
Someone fixes a Dockerfile by hand. The next regeneration wipes it, quietly. Edit the source (service.json) and regenerate with flisk config regenerate. A drift check that stops the start and names the file saves a long afternoon.
7. Random ports everywhere
Ten services on ten random ports means nobody remembers which is which. Put a gateway in front and use names, like api.my-project.localhost:8080.
8. "Up" returned, so it must be ready
It isn't. A build can outlast one command. Poll flisk status until every resource is ready, or use flisk up --json and read the result.
9. You read the last error, not the first
A failure in one service holds back everything that depends on it. The last red line is usually a symptom. Read the logs of the first failed resource.
10. A stale stack blocks the next start
An old process keeps its ports. flisk down stops resources and removes containers. If an old Tilt still answers, flisk up --force kills it first.
The short version
Check the machine, order the services, wait for readiness, never edit generated files, and read the first failure. Most "it won't start" problems are one of these ten.
