【问题标题】:Issue when deploying GRAV site using git on Gandi.net simple hosting在 Gandi.net 简单主机上使用 git 部署 GRAV 网站时出现问题
【发布时间】:2018-08-23 04:54:03
【问题描述】:

我有一个用Grav 准备的新网站,我愿意部署在我的 gandi.net 上的Simple hosting 实例上。

我已经在我的 bitbucket 帐户中使用 git 保存了我的开发。一切都好。 我已经配置了对简单主机的 git 访问权限。一切都很好。

但是当我部署我的 Grav 代码(deploy command on Gandi 显然是本地 git checkout)时,我的所有代码都部署在主机根目录下,除了 htdocs/ 而不是到 它。

然后我通过 git 更改了我的本地结构,将我的所有代码包含到本地 htdocs 目录中。但是,在 Gandi 上部署它会返回以下消息:

initializing builder
......................builder ready
Vm password:
Grabbing terminal
Ok
-----> Starting new deployment (gare.humoeursvertes.net - master)
-----> Fetching application code
-----> Building new application
ERROR: composer.json and composer.lock files should be placed outside the htdocs directory (../htdocs/)
Dependencies could not be installed. Exiting...
Please refer to the documentation:

[fr] http://wiki.gandi.net/fr/simple/instance/php-mysql?&#composerlock
[en] http://wiki.gandi.net/en/simple/instance/php#dependency_management
-----> Building new application failed
-----> Aborting deployment

显然,我不能这样做 :-( 但那有什么解决方案?我找不到任何解决方案,而且 Gandi 支持没有响应......

我假设我应该更改在 Gandi 上完成的部署(又名 git checkout)的 target 目录,但找不到任何方法。欢迎任何提示! 谢谢, 泽维尔

【问题讨论】:

    标签: git deployment grav


    【解决方案1】:

    解决方案比预期的要容易得多。这是因为 Grav 软件包带有 composer.jsoncomposer.lock 配置文件,而 Gandi 不接受 htdocs 目录中的此类文件。 因此我不得不 - 将所有内容保存在htdocs 目录中 - 但是这两个文件我已经移到了(而不是里面)htdocs

    然后部署就像一个魅力。 (与 symfony 部署相同的解决方案:http://rockstarninja.labak.xyz/gandi-sh-installation-de-symfony-3-2-sur-une-instance-simple-hosting-de-type-php-5-6/)。

    【讨论】:

      猜你喜欢
      • 2014-04-09
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 2011-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-19
      相关资源
      最近更新 更多