Staging environment and git integration

Discussion in 'ISPConfig 3 Priority Support' started by tr909192, Sep 18, 2020.

  1. tr909192

    tr909192 Member HowtoForge Supporter

    Dear,
    i know that the staging stuff was already asked few months ago, but i need some more informations.
    We'd like to know if anything is planned to integrate an easily tool in order to create a staging environment
    of an existing website (something like production: mywebsite.com -> staging: staging.mywebsite.com).
    I know that with API it's possible to do that, but i wondering if something more "integrated" with the control panel will be included in the next release.

    On that same way, I suppose that the FTP (nor FTPs) access is something that modern Web agency no longer use. Generally
    it's preferible to use git (to track the merge in production of the website). Is something that is planned the integration of ISPConfig with a git server?

    Thank you.
    Luca
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    webguyz likes this.
  3. florian030

    florian030 Well-Known Member HowtoForge Supporter

    Setting up a staging environment automatically is not as easy as you might think.
    It is not enough to copy the entire website and database. You also have to customize the config of the CMS (config-file and database entries).
    If you want the staging to be accessible at staging.example.com, you have to create DNS entries and put the environment into a subdomain (vHost).

    Apart from that you also have to take care of the free disk space. And for this it is not always enough to check the quota of the client.
     
  4. tr909192

    tr909192 Member HowtoForge Supporter

    Sure that isn't, it's for that that i was asking if exist already some tools that made this simplier...
     
  5. tr909192

    tr909192 Member HowtoForge Supporter

    Due that we are trying to implement by ourself a strategy for the staging environment, we have a couple of questions:

    1) Is it possible to point a particular third level domain to an external root directory of one particular domain? Example:

    Main Domain: mydomain.com
    His web-root: /var/www/mydomain.com/web/
    Staging Domain: staging.mydomain.com (that we can create via API)
    His web-root: /var/www/mydomain.com/another-dir/

    2) Is it possible to access (in read/write) a web-root of a domain with a ssh shell (with jailkit) created via ISPConfig? Because it's looks like that isn't.

    3) Always with a ssh-shell (with jailkit), is it possible run a git command on the web-root?

    ty
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Use vhost alias or vhost subdomains.
    2) The web root of a domain is always read and writable by the shell user of a website.
    3) That should be possible as you can run any shell application as website shell user that#s available for this user. If you use jailed shell users, you will have to install git in the jail.
     
  7. tr909192

    tr909192 Member HowtoForge Supporter

    About 1), please pay attention that i have specified a dir, outside the /web/ of the domain but in the same home of the user:

    Code:
    Main Domain: mydomain.com
    His web-root: /var/www/mydomain.com/web/
    Staging Domain: staging.mydomain.com (that we can create via API)
    His web-root: /var/www/mydomain.com/another-dir/ (for example: /var/www/mydomain.com/private/staging/)
    So, it is possible something like that from the ispconfig itself?

    Moreover, with an ssh user (jailkitted) we have this problem when we try to push a git repository:

    Code:
    [email protected]:/web$ git remote add origin https://github.com/my-repository
    [email protected]:/web$ git push -u origin master
    fatal: unable to find remote helper for 'https'
    You know what could be the reason?
    ty
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Sure, it's called vhost Aliasdomain.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    If this is a jail, then probably some of git's dependencies are missing. When you google for the error message, then it comes down to missing curl libs.
     
  10. tr909192

    tr909192 Member HowtoForge Supporter

    about the answer "Sure, it's called vhost Aliasdomain."
    it seems no instead. because the path in the configuration form refers to a URL and therefore seems not possible to make the web root of the alias domain as a path inside the userdir, for example private/staging or else where. if it is possible please specify how to configure the form in order to get that result, thanks
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    No, it refers to a path. See screenshot.
     

    Attached Files:

  12. tr909192

    tr909192 Member HowtoForge Supporter

  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    See ISPConfig Manual version 3.1 in chapter 4.6.1.5 Aliasdomain (Vhost).
     
    tr909192 likes this.
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The screenshot you posted is from an aliasdomain and not from a vhoost alis domain, that#s something different. You can find the vhost alias domains in the menu on the left side of the sites module. The menu point is labeled Aliasdomain (vhost). if you don't see it there, then you don't have vhost alias domains enabled under System > interface > main config.
     
    tr909192 likes this.
  15. tr909192

    tr909192 Member HowtoForge Supporter

    thank you both very much. i am checking this out
     
  16. tr909192

    tr909192 Member HowtoForge Supporter

    Thank you very much. This feature "Aliasdomain (vhost)" it's just wondeful.
    Is it possible to limit them via template? Because as far I can see, from template i can just limit "Max. number of web aliasdomains" and "Max. number of web subdomains".
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    They are part of the existing alias and subdomain limits, if I remember correctly.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw. Personally, I would use a separate website for a staging environment and not a vhost alias or subdomain. It's way safer if you want to ensure that the staging environment and the live site do not negatively affect each other.
     
    Th0m likes this.
  19. tr909192

    tr909192 Member HowtoForge Supporter

    mmmh i think that is simpler for the customer to have both production and staging on the same home. So he can cloning and merging staging and production more easily with git nor ftps. And also maybe it's simpler for us to create a tool that rsync the data between directory of the same user.
     
  20. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

Share This Page