This topic is locked
[SOLVED]

 Two Project Builds - Dev and Production

7/5/2016 7:12:23 PM
PHPRunner General questions
J
jump3r34 author

To any who might have some insight,
I am familiar with application design and I usually build with 3 versions at any given time - development, testing, and production. What I am wanting to do with phprunner is figure out a way to run two projects of the same application I am developing and have a process of building and rolling out changes. I have employees test the development/testing application from a different url(or I sometimes even host it locally at the office) and then when the bugs are out, we push the production-ready build to the production cloud server.
I do use git and have a separate private repo for any project we work on so another thought was utilizing the git repo and branching off a production branch. Anyone that has done anything like this with PHPRunner please let me know, it would help out as far as brainstorming is concerned.
I also have some new developments that I will be posting to the forum in the next two weeks after I have tested the functions that I have been working on. They involve creating a WEB(RESTFul) API from the phprunner db, and uploading files etc to amazon S3, and retrieving them with security and ease.
Thanks for any input

lefty 7/5/2016



To any who might have some insight,
I am familiar with application design and I usually build with 3 versions at any given time - development, testing, and production. What I am wanting to do with phprunner is figure out a way to run two projects of the same application I am developing and have a process of building and rolling out changes. I have employees test the development/testing application from a different url(or I sometimes even host it locally at the office) and then when the bugs are out, we push the production-ready build to the production cloud server.
I do use git and have a separate private repo for any project we work on so another thought was utilizing the git repo and branching off a production branch. Anyone that has done anything like this with PHPRunner please let me know, it would help out as far as brainstorming is concerned.
I also have some new developments that I will be posting to the forum in the next two weeks after I have tested the functions that I have been working on. They involve creating a WEB(RESTFul) API from the phprunner db, and uploading files etc to amazon S3, and retrieving them with security and ease.
Thanks for any input



I was always interested in this also . What I have done in the past is clone original project and all files . Call it development or etc... . I then output with a different output name to server and an make an exact copy of database with different name and connect to test database . As far as changes the only way I know of is to see revisions in the editor section and //comment. Haven't used git to do this but I'm sure it may be possible . Maybe admin support can help with that one . This way I know server isn't conflicting with my localhost differences/settings. I am also interested in your REST API . I have been working on this for sometime with mobile Hybrid/Native to PHPrunner and web server with MYSQL database and still using advanced security settings in pHPrunner. It's a bit complicated.

Sergey Kornilov admin 7/6/2016

It really depends on your development process.
Normally you you develop and test locally. At some point you upload generated app to staging area where your QA team works on it and once satisfied you can move it from staging to production.
I'm just not sure what is your scenario and what problem you facing here.

J
jump3r34 author 7/6/2016



It really depends on your development process.
Normally you you develop and test locally. At some point you upload generated app to staging area where your QA team works on it and once satisfied you can move it from staging to production.
I'm just not sure what is your scenario and what problem you facing here.


I usually have two or three builds of production projects. Development is git committed multiple times a day and tested (in other projects I build from the ground up under json{ config:{dev:{settingshere}, production:{settingshere}}} or something along those lines. Production build is usually refined and only major builds are committed to this build, as well as release notes, etc.
Git works great with phprunner however, I try to stay within the application 100% of the time so I do not mess with any of the build files of the application outside of project.
My main concern is "what are the best practices using phprunner and building long term applications"? I have built, C#, Node, php, python apps etc. and the concepts for proper builds abound, depending on what is needed, I was just trying to get some bearings on using a multiple build process with phprunner.

J
jump3r34 author 7/11/2016

Ok, for anyone wanting to know what I have found out to be the best option for getting a production type build off the ground, git is your best friend here.
I have 1 build and have branched off 'master' with a 'production' branch as well as a 'development' branch.
I only push to the production server from the production branch and it has much less commits and clutter than does the development or testing branches.
Organization is key in this regards as you never want to push or pull from the wrong branch, your workflow or SOP should be the same across the board. However, for any newbies to git - if you start the project properly and do not keep a sloppy git - never freak out when you think something goes wrong, and do not go crazy and start hard resetting the master branch or anything of that nature. There is a way to undo most mistakes in git but there are a few cardinal sins that you can not come back from.
I usually git->init from the top-level folder that is inside PHPRunner/Projects/[top-level-folder], this gives me the entire project with tmp files and all('more on this in a second'). The reason being, it keeps my entire PHPRunner project file snapshot and I can push the entire project to the cloud (I use github). VERY IMPORTANT HERE - Do Not start your project before having synced with the cloud first, this could throw your tmp files out of order, which is not a big deal, but may freak someone that has not used git out because it will not let you commit your next commit. If this happens, you should reset your working branch on your local machine and then sync, and then open phprunner. If you still have a lingering tmp backup there are a few ways you can go about getting properly synced with the cloud and not losing your current work, as well as your git history. I will not extrapolate on these methods right here, however, I can probably try and help individuals on their different basis if there is a reply or message to that effect. The reason I will not give a workflow on here is because not knowing the situation, some of the steps are very dangerous to your working files, but under the proper circumstances are completely safe, however, for novices with git, if those circumstances are not met, and you do not have a proper chain of work in git, you can lose a ton of work with a simple one line command. On the flip side of this, git has saved me weeks/months with just a few seconds of commands - done properly.
However, like I stated - I am now live with that project (beta), both the DB and Application Server are in the cloud and I can push to the app server right from git to each individual environment, and it is not a hard setup once I figured it out.

I have a demo with a client tomorrow, but after I get another week or two down the road I will give Sergey details on the Rest API framework and instructions, and see what he wants to do with that for everyone to really be able to make this a well rounded fast developing product that can be the web app core of a multi-prong data integration approach as the web and devices are moving in that direction. The framework is PHP7 now and it reverse engineers most DBs with proper Swagger documentation and JSON as well - So many people will find this extremely useful. However, it has taken me over a month (in my off time) to figure out the proper configuration settings for integrating with PHPRunner but I have a feeling it will be well worth it in the long run.
More to come - when I get some extra time.