Deployment
Basics
On this page, create, edit, and delete server access configurations that give you control over interaction between AppCode and servers. Anytime you are going to use a server, you need to define a server access configurations, no matter whether your server is on a remote host or on your computer.
Among numerous ways to configure your development and production environments the most frequent ones are as follows:
- The Web server is installed on your computer. The sources are under the server document root (for example,
/htdocs
), and you do your development right on the server. - The Web server is installed on your computer but the sources are stored in another folder. You do your development, then copy the sources to the server.
- The Web server is on another computer (remote host). Files on the server are available through the FTP/SFTP/FTPS protocol, through a network share, or a mounted drive.
Let's define the terms and their meaning in the context of synchronization between AppCode and servers.
- An in-place server is a server whose document root is the parent of the project root, either immediate or not. In other words, the Web server is running on your computer, your project is under its document root, and you do your development directly on the server.
- A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.
- A remote server is a server on another computer (remote host).
- The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.
- A local file/folder is any file or folder under the project root.
- A remote file/folder is any file or folder on the server, either local or remote.
Suppose you have a project
C:/Projects/My_Project/
with a folderC:/Projects/My_Project/My_Folder
and a local server with the document root inC:/xampp/htdocs
. You upload the entire project tree toC:/xampp/htdocs/My_Project
. In the terms of AppCode, the folderC:/Projects/My_Project/My_Folder
is referred to as local and the folderC:/xampp/htdocs/My_Project/My_Folder
is referred to as remote. - Upload is copying data from the project TO the server, either local or remote.
- Download is copying data FROM the server to the project.
Synchronization with servers, uploading, downloading, and managing files on them are provided via the Remote Hosts Access bundled plugin, which is by default enabled. If the plugin is disabled, activate it in the Plugins page of the Preferences dialog box. For details, see Enabling and Disabling Plugins.
Toolbar and common options
Use the toolbar buttons to manage the list of configurations.
The left-hand pane shows a list of all the server access configurations available in AppCode. When you select a configuration, the right-hand pane shows the configuration details.
Item | Tooltip and shortcut | Description |
---|---|---|
![]() | Add ⇧⌫ | Click this button to open the Add Server dialog box and define a new configuration there. |
![]() | Delete ⌦ | Click this button to remove the selected configuration from the list. |
![]() | Copy ⌘D | Click this button to copy the settings of the selected configuration. |
![]() | Use as Default | Click this button to have AppCode apply the settings of the selected configuration by default during automatic upload of changed files. |
Connection tab
Use this tab to choose the way to access the Web server and specify the connection settings.
Item | Description |
---|---|
Name | The text box shows the configuration name specified in the dialog box. Edit the configuration name, if necessary. |
Visible only for this project | Use this checkbox to configure the visibility of the server access configuration (deployment configuration).
|
Access type | From this drop-down list, choose the way to access the server. Use the Up and Down keyboard keys to scroll through the list of server configuration types. The available options are:
|
Upload/Download Project Files
In this area, specify the settings for accessing the server to upload and download files to and from.
The set of controls in the area depends on the chosen server access type.
Item | Description | Available for |
---|---|---|
FTP/FTPS/SFTP host | In this text box, specify the host name of the FTP/SFTP server to upload the files to. | FTP, FTPS, SFTP |
Port | In this text box, specify the port to use. The default values are:
| FTP, FTPS, SFTP |
Root Path | In this text box, specify the server configuration root relative to your user home which was defined when you registered your account. This folder will be the highest one in the folder structure accessible through the current server configuration. Do one of the following:
| FTP, FTPS, SFTP |
Autodetect | Click this button to have AppCode detect the user home folder settings on the FTP/SFTP server and set up the root path according to them. | FTP, FTPS, SFTP |
User name | In this text box, type your user name for authentication to the server. The button is only enabled when you have specified your user credentials. | FTP, FTPS, SFTP |
Log in as anonymous | Select this checkbox to enable anonymous access to the server with your email address as password. | FTP, FTPS, SFTP |
Password | In this text box, type your password for authentication to the server. | FTP, FTPS, SFTP |
Save password | Select this checkbox to have AppCode remember the specified password. | FTP, FTPS, SFTP |
Advanced options | Click this button to specify additional uploading settings in the Advanced Options dialog box that opens. | FTP, FTPS, SFTP |
Web server root URL | In this text box, specify the URL address of the Web server root folder. Both the HTTP and the HTTPS protocols are supported. To access a server through HTTPS, you need to acquire a certificate file To import a certificate in Oracle JRE:
| All |
Mappings tab
In this tab, configure mappings, that is, set correspondence between the project folders, the folders on the server to copy project files to, and the URL addresses to access the copied data on the server. The easiest way is to map the entire project root folder to a folder on the server, whereupon the project folder structure will be repeated on the server, provided that you have selected the Create Empty directories checkbox in the Options dialog box. "For more details, see Customizing Upload/Download. Below are definitions of terms used in this topic in the context of of synchronization between AppCode and servers.
- A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.
- A remote server is a server on another computer (remote host).
- The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. For in-place servers, it is the project root.
- A local file/folder is any file or folder under the project root.
- A remote file/folder is any file or folder on the server, either local or remote.
Suppose you have a project
C:/Projects/My_Project/
with a folderC:/Projects/My_Project/My_Folder
and a local server with the document root inC:/xampp/htdocs
. You upload the entire project tree toC:/xampp/htdocs/My_Project
. In the terms of AppCode, the folderC:/Projects/My_Project/My_Folder
is referred to as local and the folderC:/xampp/htdocs/My_Project/My_Folder
is referred to as remote.
Item | Description |
---|---|
Use this server as default | Click this button to have AppCode apply the settings of the selected configuration by default during automatic upload of changed files. This button is only enabled for the non-default servers; for the server used as default, this button is disabled. |
Local Path | In this text box, specify the full path to the desired folder in the project tree. In the simplest case it is the project root. Type the path manually or click the Browse button ![]() |
Deployment Path | In this text box, specify the folder on the server where AppCode will upload the data from the folder specified in the Local Path text box. Type the path to the folder relative to the server configuration root. If the folder with the specified name does not exist yet, AppCode will create it, provided that you have selected the Create Empty directories checkbox in the Options dialog box. For more details, see Customizing Upload/Download. The text box is not available for server configurations of the type In-place. |
Web Path | In this text box, type the path to the folder on the server relative to the server configuration root. Actually, type the relative path you typed in the Deployment Path text box. |
Add another mapping | Click this button to have a new line added to the list of mappings. |
Excluded Paths
Use this tab to configure a list of local and remote folders that you do not want to be involved in upload/download.
Item | Description |
---|---|
Add local path | Click this button to have an empty line added to the list and specify the location of the folder to be protected against upload/download. Type the path manually or click the Browse button ![]() |
Add deployment path | Click this button to have an empty line added to the list. Click the Browse button ![]() |
Remove path | Click this button to remove the selected item from the list. The button is only available when a line is selected. |