agentleFS
flisk-shflisk-sh/flisk-skills/skills/flisk-ports/SKILL.md

flisk-ports

Skill4 starsChanged 34 days agoMITView on GitHub

Find and fix the URLs of a Flisk stack - list routed URLs with `flisk networks` (alias `flisk urls`), understand Traefik routing on `*.localhost`, host port selection (port 80, else 8080-8180) and the FLISK_HTTP_PORT, FLISK_HTTPS_PORT, FLISK_POSTGRES_PORT and FLISK_BIND_ADDRESS overrides. Use when a service is unreachable, returns a Traefik 404, a host port is taken, or you need to reach the stack from another device. Docker network exhaustion is a flisk-doctor topic, not this one.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the shape of a URL:

    line 18
  2. Very specific:

    After changing a service.json, re-run flisk networks to confirm the new route.

    line 24
  3. Very specific:

    Do not hard-code host ports or URLs in code.

    line 35
  4. Very specific:

    Do not set port in service.json unless you need a specific container port.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ports, routes and localhost URLs

flisk up picks the host ports and prints the exact URLs; Traefik routes each request to its service. Use the printed URLs instead of building your own.

Workflow

  1. List the routes: flisk networks (add --stack <stack>, --json for the versioned envelope, or --raw for bare URLs). It also checks each URL.
  2. Read the shape of a URL:
    • A backend, agent or MCP server named orders-api is served at http://api.<project>.localhost/api/orders (a trailing -api is dropped; apiPath in service.json overrides the path).
    • A frontend is served under its base path (basePath in service.json, set with flisk resource --base-path); take its full URL from flisk networks.
  3. Host ports: port 80 is used when free, so URLs carry no port. Otherwise a free port in 8080-8180 is chosen and appears in every URL. Postgres listens on 15432.
  4. Override a port with FLISK_HTTP_PORT, FLISK_HTTPS_PORT or FLISK_POSTGRES_PORT in the environment or the project .env.
  5. Ports bind to 127.0.0.1. Set FLISK_BIND_ADDRESS=0.0.0.0 only to test from another device; flisk doctor warns while it is set.
  6. After changing a service.json, re-run flisk networks to confirm the new route.

Troubleshooting

  • HTTP 404 from Traefik: the URL has no route. Compare it with flisk networks.
  • A service's own port is not published on the host; only Traefik and Postgres are. Reach services through Traefik.
  • On Linux or WSL2, a non-root user usually cannot bind port 80, so URLs fall back to the 8080-8180 range.
  • flisk ui shows the same services interactively.

Guardrails

  • Do not hard-code host ports or URLs in code; read them from the generated environment (for example env.ts in a frontend).
  • Do not set port in service.json unless you need a specific container port; flisk resource picks a free one in the type's range.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.