7 ms·
Show HN: Pooshit – Sync local code to remote Docker containers
Pronounced Push-It....
I'm a lazy developer for the most part, so this is for people like me. Sometimes I just want my local code running in live remote containers quickly, without building images and syncing to cloud docker repos or setting up git workflows or any of the other draining ways to get your code running remotely.
With pooshit (and a simple config file), you can simply push your local dev files to a remote folder on a VM then automatically remove relevant running containers, then build and run an updated container with one command line call.
It works well with reverse proxies like nginx or caddy as you can specify the docker run arguments in the pooshit_config files.
https://github.com/marktolson/pooshit https://github.com/marktolson/pooshit
- jackpste 1y agoI have to say, the name is a great touch.
- WastedCucumber 1y agoDumb question, out of real curiosity - is the double fecal pun deliberate?
- CBLT 1y agoLine 1 of the readme has a poop emoji
- electroglyph 1y agoshitty joke if you ask me =)
- robertlagrant 1y agoI can't wait for version number 2 to drop
- upghost 1y agoI am actually surprised how well it runs, given how solid it is
- robertlagrant 1y agoI heard there's a related app called FeeCal - help calculate all your fees.
- marktolson 1y agoYes.
- deleted 1y ago[deleted]
- badc0ffee 1y agoThe joke is a deuce.
- 65 1y agoIt's actually a triple fecal pun! Push it... poo... shit.
- mouse_ 1y agogood post
- lagniappe 1y agono middlemane i like it
- ElCapitanMarkla 1y agoI had a similar script a few years ago when I refused to give up my aging Macbook Air and built a server to host my dev env. I had an rsync command that would sync the differences from my local machine up to the remote box. It was surprisingly quick considering the size of the projects.
- sippeangelo 1y agoNeat project, but what does this do differently than docker compose with the --host flag? https://docs.docker.com/reference/cli/docker/#host https://docs.docker.com/reference/cli/docker/#host It uploads your whole local docker context, source code and all, builds the image on the remote server and up's the container(s) all with a single command. I use this all the time when deploying simple services to avoid all of the complexity of registries etc. docker -H ssh://remote compose up -d
- zsimjee 1y agoTo me, it looks like this new project is aimed more at being able to develop remotely and share your localhost:3000 env instead of getting a real production box up. Bidi sync etc... hints at that, it's like having a 2-interface dev env.
- sippeangelo 1y agoI don't see that at all?
- robertlagrant 1y agoWow - never seen that before.
- marktolson 1y agoProbably pretty similar except you get to just write "pooshit" instead.
- sippeangelo 1y agoLove it.
- parhamn 1y agoWhat!?!? This is a thing? How did I not know about this. Thanks for the share!
- aitchnyu 1y ago
- eightnoneone 1y agoHow does this compare to https://www.devspace.sh/ https://www.devspace.sh/ ?
- marktolson 1y agoIt's not based on k8s, it's just pushing your local app to a server and spinning up a conainer with one CLI call.
- mhuffman 1y agoUseful project. Name that no reasonable company would allow IT department to use. 10 out of 10! It worked for CockroachDB. I hope it turns into a unicorn and I'm not joking about that.
- another-dave 1y agoI can't remember what the package was, but when I was working for "large bank", one of the npm dependencies we wanted to use had a licence file that just said 'Do whatever the fuck you want'. Legal came back saying that it was "highly unorthodox, but approved for use"
- catlifeonmars 1y agoThat’s amazing. I’d really like to steal that, but not being a lawyer, I’m not sure how viable it is as an actual license.
- dijksterhuis 1y agoFSF has approved it, OSI has not. Make of that what you will. https://en.wikipedia.org/wiki/WTFPL https://en.wikipedia.org/wiki/WTFPL Notes from OSI rejection board meeting > It's no different from dedication to the public domain. -- https://en.wikipedia.org/wiki/WTFPL#cite_note-osi-2 https://en.wikipedia.org/wiki/WTFPL#cite_note-osi-2
- spacebanana7 1y agoI believe people chose to pay Adobe subscriptions simply to avoid explaining the acronym for the GNU Image Manipulation Program in meetings.
- thot_experiment 1y agoI'm going to have to challenge you on this one. I'm not great lover of Photoshop, and GIMP does have an unfortunate name, but it is an alternative to Photoshop in the same way Gentoo is an alternative to Mac OS, you're not wrong but...
- _def 1y agoI don't really understand the use case and wonder if containers are the right tool here at all.
- marktolson 1y agoHere is my main use case. I have lightweight services that I need to update and deploy regularly (until I movee to K8s or a proper production env). Using pooshit, I can push my entire local dev folder to a remote server then destroy the old image, rebuild the new image and spin up a new container with one call. Your config file contains your remote config. You need nothing in between you and your remote server and it only relies on SSH and docker, nothing else, no middleman, repos, and no deployment containers running on your VM.
- fny 1y agoThis is a steaming pile of SFTP. Why not use rsync or wrap it if you must? For anyone who's interested in proper bidirectional sync check out Mutagen.[0] [0]: https://mutagen.io/documentation/synchronization/ https://mutagen.io/documentation/synchronization/
- marktolson 1y agoBecause I don't want to do this: https://mutagen.io/documentation/introduction/getting-started/ https://mutagen.io/documentation/introduction/getting-starte...
- fny 1y agoThis doesn't answer why you're manually handling everything with sftp instead of rsync.
- bilekas 1y agoCan't wait to try and get this greenlit at work.
- marktolson 1y agoBetter off trying to get it brownlit.
- infogulch 1y agoMy grandma laughed at this one.
- wolttam 1y ago`docker context`?
- gregjw 1y agowhat a name! fun conversations ahead for people that want to utilise it at work!
- scottydelta 1y agoI understand what you are trying to do but you should checkout dokploy or coolify. You push to github, github action builds it and hits dokploy webhook and it pulls your github code and build and deploy on that server. This is more reliable and industry way. What you are doing requires same amount of time to deploy and requires manual intervention every time. For once i thought you were moving code to server and then you just restarted container and it worked without having to build. I have done it in the past due to some unique requirements where dependencies are in docker image and code is copied from local to server and docker image took code from server on start.
- marktolson 1y agoNot sure if you read the description but I clearly stated that I wanted no middleman, so I'm not sure how this solves my use case. Also not sure how it requires the same amount of time, and 'manual intervention every time'? You provision a remote server, install docker then update the local config file and it's done. One line deployments everytime. And why would I update the code inside the container when you need a build process to install dependencies? If you want to update code while the app is running then restart, then docker is not the right solution. Additionally there are a million different and better ways to deploy services, this suits the use case I described.
- coded_monkey 1y agoThere is nothing “industry way” about letting CI automatically deploy your production environment.
- scottydelta 1y agoCI/CD are used for deploying to all kind of environments. For production, the triggers are different. Instead of deploy on PR merge, you would define the trigger as tag creation. Now when you make a release mauanlly on github, it will create a tag which in turn would trigger deployment.