Dev environment and Production environment on the same server

Hi Y’all,

So, I’m toying with moving my SC dev environment (Windows PC) to be on a server that houses my Production environment (Ubuntu/Linux). Mainly to allow me access to development wherever I may be. Yes, I could spin up a separate server just for the dev bit - but that has a cost. So if dev and prod can coexist that would be preferable.

The thing is:

  • Is this doable?
  • If it is, is it ill-advised?
  • Would the dev install need the built-in Apache and/or MySQL in addition to the Apache/MySQL already running on the server (if that’s even possible), or can (should?) the server’s already installed Apache and MySQL be used (which would mean development and production databases coexist in the one MySQL instance).

Thanks in advance…

Adz

I was thinking about similar solution, as it takes long time to upload my project to the Hosting server and then deal with access rights. I created some batch file to deal with it through SSH but it is still pain on the but.

I tried UBUNTU Server on RASPBERRY-Pi, but could not get this to work (just lack of knowledge or experience). I am sure it is doable.

Another options that I am about to test next few weeks is:

  1. my NAS (which has an option to add webserver)
  2. designating any other Win10-PC to run XAMPP (which isn’t an option to run a full production instance, but good enough for testing). The only challenge is to deal properly with the TCP/IP ports
  3. possily VM running either Linux+NINGX+PHP+MySQL or another instance of Win+XAMPP

@aklass - I did actually achieve this in the end and it all works very nicely.

I did hit a few permissions problems initially and had a remote control session with one of the SC folks to help figure stuff out. Once I realised most of my permissions issues were more ownership issues than folder/file permissions it was plain sailing. He also confirmed that running dev on same server as prod is totally fine.

One specific high point is with deploying projects/apps because you can “deploy on a server directory” provided dev and prod live on the same server (that alone confirms dev and prod on the same server is fine). And this was a joy as it’s sooooo much quicker than deploying via FTP.

So now my setup is that both dev and prod run on a single Linux/Ubuntu server (Apache and MySQL were installed and configured separately).

I would question running on a Raspberry Pi or a NAS as I think you’ll find them both potentially a little bit slow (both dev and prod). I did have SC running on my NAS a few years back and it was tolerable but not great - but then again, I appreciate processing power on the Pi and NAS’s have greatly improved over the years. Anyway, good luck.