I've been developing using VSCode's remote extension to connect to my tiny AWS EC2 instance. It regularly gets a bit overwhelmed and hangs on me. Tried PyCharm's gateway but the server is underspec'd and install fails.
Anyone got a workflow that is as fast for me? Maybe something like a git diff and pull type job that I can set to run near constantly and then have flask's hot reload keep it updating.
(If I get any traction with the small project, I'll up specs and set up proper dev and test environments)
My favorite way is to run
git pullon my server, which you can do with a single command on your local machine.For example, I might start by cloning my project into
/var/www/exampleon the VPS. I configure nginx to serve example.com from that folder. When I’m ready to deploy I run something like:ssh -t user@example.com 'cd /var/www/example; git pull'
Simple and effective. Add that line as an alias or write it into a
release.shscript for easy access.It will need to get more complex if you have a complicated build process for the project, but I try to avoid that, especially early on.
If you don't require your remote machine to be on AWS, you might have a better experience with another VPS provider. You can get a dedicated, physical server without resource sharing on Hetzner (and others, OVH might also work for you) for as little as ~35 bucks per month.
You could also take a look at JetBrains Fleet. Fleet was developed from the ground up for remote development and is very similar to VSCode from a philosophical standpoint.
I am mostly a WordPress dev, and I use Lando (which is Docker for noobs like me, who don't know anything about Docker) inside WSL2.
It's super easy to set up a local dev environment that matches your staging/production servers.
Then to deploy, for small projects I usually use plain old SFTP (I know... but hey, in the WordPress world SFTP is still a thing! :D ) or if I am lucky and I have a great client, there is some automated way of deploying stuff already set up (Circle CI, GitHub/Gitlab/Bitbucket pipelines, or something similar).
I am currently working on a personal WordPress-based project. The code is hosted on a self-hosted instance of Gitea, and I am thinking of setting up some kind of automated deploying via Woodpecker CI (also self-hosted) to a VPS, but I am not there yet.
Dont see a reason to develop remotely especially in an EC2 tiny instance.
The flow should be like any startup/company, you develop locally, merge the code changes, when enough changes for a new version then you deploy.
If you really want to keep that remotely dev experience you can use code-server by coder. can be set easily through a docker container.
Also my own product will have exactly that remote dev workspace as-a-service but it will be later in the development, not currently available.
Coding on Github Codespace that has a Github Action that deploys the code to an ECR repository for which my Lambda sits on top of. Anytime a commit gets merged into master branch, the Github Action kicks off. I thought about deploying the code onto an EC2 but Lambdas are a lot cheaper and still effective for my workflow.
Most things I've worked on had a pipeline eg. GitHub/gitlab. Merged code is deployed automatically after passing tests.
I'm either coding on my local machine with VS Code or using Github Codespace. Seamless experience so far.