developmentseed / remote-workstation

A Dockerised work environment hosted on AWS Fargate which can be SSH'd into ☁️🌎📦
MIT License
24 stars 2 forks source link

Document Syncing Code #11

Open wildintellect opened 3 years ago

wildintellect commented 3 years ago

This is just a VS Code specific annoyance, that there's no easy/good way to have your code show up on the remote machine. https://code.visualstudio.com/docs/remote/ssh#_working-with-local-tools

wildintellect commented 3 years ago

As an update to this, I think I saw that a repo using github actions blocks https authentication, so you can't clone to the remote machine without a private key on it?

wildintellect commented 3 years ago

Documenting Options:

  1. rsync (sync file to the remote as needed)
  2. sshfs (mount the remote locally and copy files, or work directly on them)
  3. include repo clone in Dockerfile
  4. use Github personal authentication token with https to pull/push changes on the remote
  5. use a Deploy key to allow pull only access to code on the remote

Opinion: I prefer option 5, all code is edited locally, checked into git, pushed, then pulled with a deploy key on the remote. Why:

Note: options 4 & 5 require git to be installed in the docker image. TODO: add to the notes/example on building a docker image for remote use.

Option 1 is probably the next best choice: simplest to setup, need some simple rsync examples that explain what flags and how to do the paths right.