简体   繁体   中英

What's a good toolchain and deployment process for GIT and Deployment for a Windows user working on a LAMP Stack?

I run a custom PHP site on a Managed VPS (LAMP stack) and am the solo developer, but want to start using GIT so freelancers can contribute. Currently I don't use GIT.

GIT

For GIT, I wanted to use Visual Studio Online (VSO) since I've used it before but am open to suggestions if it's better for the suggested deployment process.

Deployment

I kept a "Dev" folder and a "Live" folder on the web server and simply did all of my dev in the Dev folder, tested there, then ran rsync to push it to the Live folder. I couldn't easily run it locally since it has things like Linux symlinks, and I work on a Windows computer.

The Goal

I want to start adding GIT to this process, integrate that into a decent build process, and still use a Windows IDE for development. Though maybe I should install a Linux VM on my Windows machine so I can start running the site directly from pulling the latest version from GIT?

I need a setup that would be easy for other developers to join on as I find freelancers to help out.

Suggestions?

here's what I do for

Git deployment

For deployment, I follow a very-simple git-flow technique ( http://nvie.com/posts/a-successful-git-branching-model/#the-main-branches ) with 2 branches:

  • master for prod
  • dev for new features

You always develop new features on dev branch, so dev is always ahead of master in term of functionnalities.

When you want to deploy, you SSH on your server, you git pull dev branch, and if everything works fine, you git merge with master.

You can always switch on the prod server between prod and dev version with git branch master and git branch dev . No need of 2 folders, git handles this !

If you have a bug on prod environment, you can switch branch to master on your local computer and fix the bug. Then you upload it via ssh.

Multi collaborator development (developers with windows/linux/mac but 1 production server)

I personally use docker, it creates a single VM which you can customize to match your prod environment (linux version, apache version, php version and my sql version). You create 1 docker image, and then every collaborator can download this image and run it on his computer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM