So, this is my actual workflow:
- With my IDE (Webstorm or Aptana, I'm on windows) I create a project and I synchronize remotely via (s)ftp
- I then create a git repository and push it on bitbucket
- Everytime i upgrade the project in local , it syncs with the production version on the server. I then commit and push the changes
- therefore, my actual environment is local > production
I would like to switch to multiple environments (local > development > production), where local is my pc and development/production are on the same server (dev in a subdomain), using ee master config
I read a bit and I found two solutions:
1) git/bitbucket + ftp + deployhq
In practice: local version synchronized remotely (dev.mysite.com pointing to a subfolder), then push in the repository on bitbucket and finally deployed into production via deployhq
pro: maybe the simplest solution
cons: deployhq or beanstalk are payments services (free version of deployhq has 1 repository and limited deploy)
2) git and ssh installed on the server
I copy these steps from another discussion:
- do a git init in production server (is this safe?)
- clone the repo from production to staging server
- developers clone the repo from the staging to their local machine
- push files to the staging server after finish changing
- when staging is ready, push everything to the production
Are these steps correct? I'm not very familiar with git, so can you give me an example of the commands to use? I would use this solution. Also, can I still use bitbucket?
Are there better solutions? Thanks in advance