Best practice of the production environment - Discussion

Best practice of SC production environment

Good evening guys,

I’m somehow new yet to SC and want to know the best practice of the production environment, I understand once development is finished, we should deploy it, and hence that package must be moved to the live server…

Now, about the production package exported from SC, either unzip that zip file or to deal with the folder that was uploaded using ftp…

Now, once you launch the app for the first time, in the live server, it directs you to the production environment of the application, which is protected, to arrange the files and creates the connection of the db on the live server…

Until here is fine>>>>>>>>>>>

1- I see that prod folder is almost 40 mb! which has a lot of not needed stuff for this specific application right?

2- Why the prod package should be always there even after the app is working on the online server?

3- What is the need for the protected area that changes the connection, after the application is launched and working fine?

4- Can i delete it? anybody can see it if navigate to application/_lib/prod - i don’t want them to see the login page, they will be confused then

5- how i can remove the accessibility of this production environment of the app after finishing and publishing it?

6- can i just deploy to xampp/wampp server on localhost then move the files manually along with the manually-exported mysql sql file?

7- in this case, dont we need the production environment again? were to change the connection manually to the new db info on the live server?

8 - in short, production environment, with each application should be on the live server? why? it is added size i think, can i get rid of it? specially the
place that login to the production environment for reach application, how i can protect it or hide it or remove it?

9 - in case of new version of the app will be there, then it will be totally as new deployment on the same server, but, using the same database right? so we will need again the production environment of the x-version of the application? once more? why?

10- overall, i don’t really understand this production thing and what is the best practice of it? i want to make the files as minimum as possible and decrease the need of uploading about 50mb for a single application, as well as, make sure nobody can access the login area of the production server for security reason? and not to see it at all!

How are you doing with this issues guys? and what is the advisable workflow you think?

Thanks and regards,
Mike

See additions to your questions below.

[QUOTE=itsme3;21984]Best practice of SC production environment

Good evening guys,

I’m somehow new yet to SC and want to know the best practice of the production environment, I understand once development is finished, we should deploy it, and hence that package must be moved to the live server…

Now, about the production package exported from SC, either unzip that zip file or to deal with the folder that was uploaded using ftp…

Now, once you launch the app for the first time, in the live server, it directs you to the production environment of the application, which is protected, to arrange the files and creates the connection of the db on the live server…

Until here is fine>>>>>>>>>>>

1- I see that prod folder is almost 40 mb! which has a lot of not needed stuff for this specific application right?

Scriptcase has a large basic lib and the largest part is the htmlt2pdf part. If you don’t need it, you can delete it as well as other stuff you are not using. On the other hand, it’s a one-time upload. After initial upload you only need to upload the changed files. But I posted a request to be able to select the _lib modules for upload as a feature request long ago, they might come up with something one time I hope.

2- Why the prod package should be always there even after the app is working on the online server?
Not sure what you mean here. The _lib contains a module where you can set default directories and database connection. If you have set the connection you can rename/delete the app maintaining this.

3- What is the need for the protected area that changes the connection, after the application is launched and working fine?
To be able to change it if you do modifications on your database or want to change the database for testing. If things work fine you can delete afterwards (I useually don’t).

4- Can i delete it? anybody can see it if navigate to application/_lib/prod - i don’t want them to see the login page, they will be confused then
It will only popup initially when there’s no connection set. The second time you need to link to _lib directly to be able to see it.

5- how i can remove the accessibility of this production environment of the app after finishing and publishing it?
Same q as above.

6- can i just deploy to xampp/wampp server on localhost then move the files manually along with the manually-exported mysql sql file?
yes, it’s the way I do it.

7- in this case, dont we need the production environment again? were to change the connection manually to the new db info on the live server?
No, you need to set the connection on each and every deploy once.

8 - in short, production environment, with each application should be on the live server? why? it is added size i think, can i get rid of it? specially the
place that login to the production environment for reach application, how i can protect it or hide it or remove it?

I think you keep asking the same questions. If you are bothered by the _lib admin page then just rename it to something else. I think you can delete that module but just simply try it out. Don’t bother of the size of the _libs. For most hosting parties this is not relevant.

9 - in case of new version of the app will be there, then it will be totally as new deployment on the same server, but, using the same database right? so we will need again the production environment of the x-version of the application? once more? why?
I don’t understand this question at all. Just generate your application, deploy fully locally and only upload the changed files but not the _lib. I do it that way for ages and works fine.

10- overall, i don’t really understand this production thing and what is the best practice of it? i want to make the files as minimum as possible and decrease the need of uploading about 50mb for a single application, as well as, make sure nobody can access the login area of the production server for security reason? and not to see it at all!

Delete the _lib/prod modules you don’t use/need. I personally don’t bother, but we think differently I guess. Initially you need the admin section. After that I think you can rename/delete the application that does this. But I never do, so you need to test that out yourself.

How are you doing with this issues guys? and what is the advisable workflow you think?
Already above.

Thanks and regards,
Mike[/QUOTE]

Albert! you really covered all of them perfectly, you are a life saver, thanks a lot indeed :slight_smile:

I know I’m keep repeating the same question again and again, this is becasue i am really happy with SC and want to understand it more and more :slight_smile:

It was just like confusing to me to have this production area make someone setup the application for the first time, it looks like you have an area to control your application on the live server!

ok in short then, true or false?

  • this production area thing, will be asked once only when first published, once you navigate to the application directory on the live server, it will setup a connection for you and keep there (after forcing you to change your password for this production area first)

  • each application has its own production password, it is like do it once and forget it… it has nothing to do with another applications production area?? it works as a control panel for this very application on this very server right? not related to anything else on the live server, we can consider it like a plugin for this application that setting it up on this server…

  • when i have a new version of this application, then i will deploy it locally on xampp then take all files (other than /_lib) and upload to live server overwriting all old files, then, if new tables were created in the db, i have create them again manually in the live server, right? - no need at all for the production connection creation in this case right?

thanks again dude, and i totally agree with you regarding scriptcase should select what to include in the production instead of having it all uploaded, this is done in many applications!

out of this subject, isn’t it better to have one /prod/ folder on the server and make the scriptcase application use this one always isntead of copying it along in all application directories? just thinking :slight_smile:

well, again, appreciated

have a nice day ahead

1: yes 2: depends, you can setup and forget, then if you upload full _lib again you need to redo your setting. 3. If you are going to redeploy you only need to upload the changed apps and apply the database changes if you have them. As long as you don’t upload _lib, the same connection will persist. 4. You can create all out of one application and create subdirectories for you applications to be able to share your _lib. The only argument against is would be that if you do need to upload a new _lib, i.e. when a new version of SC comes, you need to regenerate all apps and test at once. That would be a no-go for us as we have a lot of projects. But in general it’s doable. I prefer to have a _lib for each project as I deploy to subdomains.

In fact there is a little file created in your _lib\conf dir somewhere called prod.config.php that holds the connection. As long as you dont overwrite that one it should be all right.

Appreciated guys

Thanks a lot for your time and explanations

Mike