Skip to main content

Port Mapping

Raftt lets users map ports in the containers to local ports to make the remote environment feel like a local one. This can be done using several different methods:

  1. As a part of the env definition
    1. Defining it directly in the .raftt file.
    2. Defining it in an docker-compose file imported into the .raftt file.
  2. Using the raftt port map command.

Example use cases for port mapping include:

  1. Mapping the HTTP port of your web container to allow accessing the app from your browser using localhost.
  2. Mapping the management port of your DB to allow using the DB's client from your local machine.

Reverse Tunnels

Raftt also allows creating reverse port mappings, letting the remote environment access processes opened locally. This is a rare use case, but if you require it, use raftt port map -r.