News for hackers. Stuff that matters.
Re:Free resources for learning full-stack web development by lacampbell on Thursday March 16, 2017 @11:30PM (#13891205)
Shameless request for advice - what's the simplest way of deploying stuff to a VPS?

I want to somehow set up an identical environment on my dev machine, and on a VPS in another continent (too much latency to edit files on directly). Ideally I'd then be able to deploy from a dev environment identical to my production environment. I tried docker but debugging the containers did my head in. I was thinking of trying VM images with vagrant, but I'd love to know if there is a simpler solution to this.

I'm just one person doing it in their spare time.

Re:Free resources for learning full-stack web development by sillysaurus3 on Friday March 17, 2017 @01:01AM (#13891626)
One solution is to set up a droplet which serves a website from /home/deploy/web/site/ on the server. Then to deploy:

rsync -Pa ./site/ [email protected]:/home/deploy/web/site/

Note: The trailing slashes are important.

I use nodemon to watch /home/deploy/web/site/ for changes, which restarts the server. There are tools like nodemon for whatever stack you're using (rails, etc).

Re:Free resources for learning full-stack web development by ldonley on Friday March 17, 2017 @03:52PM (#13897384)
Maybe I am biased, but I agree with the other user on here that Ansible is a good solution for keeping the environments the same.

However, if you're feeling brave, you should definitely check out OpenShift (community version at http://openshift.org). OpenShift is basically Kubernetes with a bunch of cool stuff added, one especially useful feature is source-to-image.

It pulls your code from a scm repo and finds a builder image (or you can choose one) and it will build the docker image for you. You can have it pull whenever there is new code and rebuild the image and deploy if you want.

On top of that you get lots of cool docker orchestration features.

Re:Free resources for learning full-stack web development by ing33k on Friday March 17, 2017 @12:54AM (#13891596)
simple solution is just using shell scripts.

if you are looking for a product who's primary goal is to create identical machine images check out Packer https://www.packer.io/intro

Re:Free resources for learning full-stack web development by haikuginger on Thursday March 16, 2017 @11:41PM (#13891272)
I really like Ansible. It provides a declarative framework for defining "roles" a server might have, and requires a minimal toolkit to get started- no images to deploy; just define the state the server should be in at the end of the playbook.
Re:Free resources for learning full-stack web development by closed on Friday March 17, 2017 @12:39AM (#13891542)
If docker didn't work for you, because it didn't feel enough like having a virtual machine you can tinker with, then vagrant might be a good choice.