16. October 2017 09:50
In previous post, We know how to deploy TinyERP to azure using visual studio.
In this article, We will learn how to deploy using FTP.
There is problem with CodeProject when importing my article (auto at https). Please see it on my blog for more information.
We can also public TinyERP to azure manually or automatically to remote ftp server.
- Go to overview information of "tinyerp" app service in azure and get the url of ftp server:
- For the password, We can set it form "Deployment Credentials" of "TinyERP" app service:
- There is another way to get ftp information for this app service form "published profile":
- And the content of downloaded file as:
profileName="tinyerp - FTP"
userPWD="pwd for ftp user" destinationAppUrl="http://tinyerp.azurewebsites.net"
In above XML, There is necessary ftp information for us. What we need to do now is using FTP client, connect to that server and upload your compiled files.
- For now, Let compile your TinyERP to compiled files using existing publish profile in visual studio. This profile will publish TinyERP to you local folder named "<root>/deployment/api" folder:
- This is default name which publish the compiled file to local folder
- This is where the published filed will be stored
- Please select the correct configuration, as this will impact to alot of other system configurations for the system.
- I suggest that we should delete all files. This help us avoiding some problem with out-of-date dlls.
- Click on "Publish" and check the "<root>/deployment/api":
- This is the output of publish process. There is no errors.
- This is published result in destination folder.
- now, let use FTP client and upload these published file to remote ftp server, in this case, I use FileZilla as ftp client tool:
- Let try to run tinyerp from browser:
- There is an other way that we can auto upload compiled files to remote FTP server using FTP publish profile. Let create new FTP publish profile in visual studio:
- Name of publish profile, this was not important.
- This indicates that we use FTP and upload compiled to remote server.
- This is FTP server which compiled files will be deployed to.
- The folder on server, where those files will be located.
- FTP user name
- FTP user password.
- Check in this, if your ftp server require "Passive Mode".
- Click on "Publish" button. Your code will be compiled and deployed to remote ftp server.
- You can see "Hello" in response body. It means your api works well. Let try to call some other api, such as: getting the list of permissions:
- Or create new permission:
The API was written in REST format, for more information, see REST overview
Let continue "Deploy to Azure - Using Power-Shell" in next part.
For more information about other articles in this series
Thank you for reading,CodeProject
Note: Please like and share to your friends if you think this is useful article, I really appreciate