Raftt keeps all the repository files synced between the local machine and the remote environment to allow live development in the remote environment.
The whole repository is synced, excluding the files ignored by git (defined in
Under the hood, the syncing is performed by an OSS tool called Syncthing.
Mounting a Synced Folder
You can specify bind mounts inside your docker-compose file or mount a
repo_volume in the
.raftt file to access the synced files in any service. For example, if you have the following docker-compose in the root of your repository:
The synced repository directory will be mounted at
/app in the remote container.
Would mount the
models subdirectory to the destination container under
By default, the dev container includes a mount of the entire synced folder in
/code. Feel free to move this to wherever is convenient for you! :)
In some cases, you may need to mount code over existing content in the container. This works as expected. If you need to preserve some of it, you can accomplish that by using a volume:
This will make
/app mounted to the synced repository, but within it, "node_modules" will auto-initialize an unnamed volume with the file's contents from the image. See the equivalent docker documentation here.