在Gandi.net简单托管

时间:2018-03-14 15:19:09

标签: git deployment grav

我有一个我用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)的目标目录,但找不到任何方法。任何暗示欢迎! 谢谢, 泽维尔

1 个答案:

答案 0 :(得分:0)

解决方案比预期的要容易得多。这是因为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/)。

相关问题