DEV Community

flisk
flisk

Posted on

What Really Happens When You Type flisk up

flisk up is the one command at the center of the CLI. This post walks the quickstart and then the five steps Flisk's docs say happen behind that command.

Install and check

curl -fsSL https://flisk.sh/install.sh | sh
flisk --version
flisk doctor
Enter fullscreen mode Exit fullscreen mode

flisk doctor prints a list of checks. The last line starts with "Doctor passed". Yellow lines are tips, not errors. If a check fails, doctor says what to install or start.

You need Docker (or a compatible container runtime) running and the Tilt CLI installed. On macOS the quickstart gives brew install tilt.

Start the example

git clone https://github.com/flisk-sh/flisk-example
cd flisk-example
flisk up
Enter fullscreen mode Exit fullscreen mode

Flisk says what it is doing at each step, then prints links to the website and the API. Leave flisk up running. If you lose the links, run flisk networks in a second terminal. To stop everything, run flisk down.

The five steps

The "How it works" page lists the same steps for every flisk up.

  1. Describe. Each service has one service.json: its name, type, port and health check. A service with a command runs as a plain process.
  2. Generate. flisk up finds every service.json and writes the Tiltfile, the Compose file and the Traefik routes into .flisk/.
  3. Start. Local-process services start on your machine. Container services are built and started by Tilt on Docker, and reload when you save a file.
  4. Reach. On the Docker path, Traefik puts one address in front of every service. Flisk prints the URLs when they are ready.
  5. Check. flisk status shows which services are healthy, and flisk logs -s <name> shows why one is not.

The files in .flisk/ are written by Flisk. The docs say to change service.json, not them.

When it fails

The quickstart has a table. Three common rows:

  • flisk: command not found: the installer printed an export PATH=... line. Run it, then open a new terminal.
  • Docker is not running: start Docker Desktop, or run colima start, or on Linux sudo systemctl start docker. Check with docker ps.
  • Ports are taken: another program uses the port.

Something else? Run flisk doctor, then look the message up in Troubleshooting.

Start from nothing

You can also make an empty project and add services to it:

mkdir my-service
cd my-service
flisk project --yes
flisk resource api --type backend --stack shop
flisk project --check
flisk up shop
Enter fullscreen mode Exit fullscreen mode

The docs say the resource command asks you to confirm. flisk project --check validates the project before anything starts. To start one service before another, list it in dependsOn.

No Docker, no install

The sandbox page offers a way to try the CLI in a container:

docker run --rm -it --entrypoint sh flisk-sh/releases:latest
Enter fullscreen mode Exit fullscreen mode

Windows note: the quickstart says plain Windows can install Flisk and run flisk demo, but it cannot start a Docker app. Use Ubuntu in WSL2 for that.

Docs: https://flisk.sh/docs/how-it-works/ and https://flisk.sh/docs/quickstart/

Top comments (0)