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:
- As a part of the env definition
- Defining it directly in the
.raftt
file. - Defining it in an docker-compose file imported into the
.raftt file
.
- Defining it directly in the
- Using the
raftt port map
command.
Example use cases for port mapping include:
- Mapping the HTTP port of your web container to allow accessing the app from your browser using localhost.
- 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
.