This tutorial shows how to do a typical deployment in the Scritpcase. The scriptcase contains two models of application deployment:
Typical and Advanced.
If you are unsure of how to deploy to a hosting server, watch this video tutorial about deployment here.
1. Web server (eg: Apache, IIS)
2. PHP version 5.4 or higher.
3. Access to the database that will use the project after it is deployed;
Starting the advanced deployment process:
This type of deployment is intended for users who want to use the default settings of the production environment (Common Libraries), this configuration is made automatically by Scriptcase. The process is described below:
Step 1: Access your project and choose the option "Project -> Deploy", available in the top menu.
After click in Deploy, you have the option to deploy all project applications or choose which will be deployed. In this tutorial we will use the option "All".
Note: Case you choose the option "Select Applications", a screen with all project applications will be displayed so you can choose only those that will be deployed.
Step 2: In the next screen, choose which type of publicacion you want to use, for this examples we will choose the "Advanced".
Step 3: Let's create a deployment template so the settings can be saved and reused whenever wanted.
Step 4: Set the directory structure of the production environment according to the structure of common libraries defined on the production server. Two separate configuration examples are shown.
If you wish, after finishing the deployment process, in addition to the project link, the link to the production environment (Common Libraries) is available, check the option "Deploy with the common files(CSS, buttons, images, messages)"
Note: It is necessary to create a directory on your production server, to house the entire deployment production environment (Common Libraries), remembering that in the documents directory you must inform the absolute path to the folder. In this example we are using the directory named "producao".
Directory of the Production: Set of libraries and services used by applications published. Set here the path relative to the prod directory, eg: /production/prod or /prod
Directory of the Images (used in the upload process): Folder where the images are saved when some application uses a field of type "image (file name)". Enter this option and the relative path to the img directory, eg: /production/file/img
Directory Temporary: Folder will be created where the temporary files created during the execution of applications. Files in this directory are removed periodically based setting specifies, by default is 120 minutes. Use this field the path relative to the tmp directory, eg: /production/tmp or /temp_files/tmp
Directory of the Documents (used in the upload process): Folder where you saved the documents, when some application uses a field of type "Document (file name)". Absolute path (full path) to the doc directory, eg: C:/Apache/htdocs/production/file/doc or C:/Apache/htdocs/my_documents/doc
Note: The Character "/" means that tthe root of the Web server is used for relative paths.
Step 5: Set the name of the connection with the database, which will be used in the project after it is published.
Choose the mode of deployment to be used. ScriptCase offers three options:
1 - Generate the ZIP with the applications (recommended): At the end of the process will be provided a link to download the deployment package.
Note: This option is recommended as it is the least dependent on other services to be performed.
Deployment on a server directory: Deploy the applications in the directory informed. This option should only be used if the deployment is made in the same server where the ScriptCase is installed, otherwise the option will not be valid.
If Scriptcase can't find a folder named "teste", an alert screen will be displayed asking for this folder to be created.
Deploy on FTP server: Automatically deploy the applications on a remote FTP server.
Note: To use this option it is necessary to have a server that has FTP access and a user with write permissions in the same folder.
FTP server: Server which will be used to deploy the project. Insert here the domain of your FTP server.
User: FTP user of the production server, remembering that this user must have write permission in the server folder, otherwise it will not work.
Password: Password of the FTP user.
Directory in the FTP: Directory of the chosen server for deploy the project.
Step 7: At the end of the process, a report of the deployment applications will be displayed along with download links, both for the project and for the common libraries, which are the necessary routines for running the applications in a production environment, which is why it is mandatory that they be taken together to the deployment package.
Note: With the advanced deployment, is necessary to download the "Production Environment", which corresponds to all the files responsible for public libraries. If you do not wish to download the Production Environment (Common Libraries) generated by the link after deployment, you can choose to download it here. If you want to deploy the same project again, no need to download the common libraries. This information is not only valid when ordinary libraries have been updated to a new release of ScriptCase.
Starting the process of creation of the Production Environment:
Step 1: The next step is to extract the zip files generated by ScriptCase.
The structure will look like the image below:
Within the root folder (wwwroot) was created a folder named "teste" and within this folder, the applications zip file was extracted.
Creating the connection
In the next step, we will create the connection.
Step 1: Access the 'production environment' in the browser at the following address 127.0.0.1:8092/producao/prod. You will see a screen like the image below. For the first login the default password is scriptcase.
On the next screen you will have to set a new password to enter the "production environment".
Step 2: On the next screen you will have to define a new password to enter the "production environment".
Step 3: Upon entering the production environment, you will see your connections, click on them and continue the configuration process.
Step 4: In this step we choose the database, the database we use in the application.
Step 5: We will inform the Database Server, in ours as the database is on the same machine as the applications, we can call it through ' localhost ', if the database is on another server it can be called through the machine name or IP number, we will inform also the Login and Password to access the database (if any).
Note: For the example, the MySQL database was used.
Step 6: The last step will be accessing the application in the browser.