1

I've been learning craft and want to setup a production & development environment. I've primary HTML CSS experience with limited backend or server related experience

One way I thought about doing this was setting up 2 separate droplets on Digital Ocean (w/ServerPilot) and copying digital ocean snapshots from the dev droplet to the production droplet.

  • Is this a feasible approach?
  • Does the license allow this if I don't map a domain to it and operate it as an IP address OR use an obscure term (staging etc.) in a odd domain (vs. sub-domain as mentioned in docs)?
  • Is there a better (noob-friendly, learnable) way to do this?

Thanks

1

Does the license allow this if I don't map a domain to it and operate it as an IP address OR use an obscure term (staging etc.) in a odd domain (vs. sub-domain as mentioned in docs)?

Yes. As far as I'm aware, Pixel & Tonic consider a development site to be any non public domain.

Is this a feasible approach? Is there a better (noob-friendly, learnable) way to do this?

Lumping these 2 together since they're directly related. This question and subsequent answers might help you out as well as Craft's own list of resources.

It really depends on what you want to learn. When you spin up a droplet or other virtual machine, there's a lot of moving parts there. You'll be dealing with a lot of server management and not necessarily Craft development. It's easy to go really deep down the rabbit role and come out with a lot of (depending on what you seek out) useless knowledge. If you're just tinkering around, you probably want it as hands-off as possible.

Instead of paying for 2 droplet instances, you could spin up a virtual machine locally, like Virtualbox or something prebuilt like Laravel's Homestead. A droplet is also on the internet, thus a "public" server, so unless you want people hacking your instance, you'll want to secure it down. That just adds another layer of complexity.

Virtual machines are great solutions but they're also overkill usually. I find the easiest approach is to develop locally and use something like MAMP and then push it to staging and/or production servers. You don't need to worry much about the nitty gritty of permissions, firewalls, etc.

  • To add to the above, you can, to a certain extent, have the best of both worlds - use a service like Digital Ocean to make droplets but hand off the bulk of server and security management to ServerPilot. In which case you could do droplet copies etc. Not sure I would do deployments that way personally, but it's a really nice option that sits inbetween managed hosting and having to fully manage your own servers. – Jeremy Daalder Nov 18 '15 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.