在部署新版本的strongloop项目时,如何停止清空存储容器?

时间:2021-04-08 07:26:07

I have various storage containers created in './client/storage' in my project.

我在项目中的'./client/storage'中创建了各种存储容器。

When I deploy my project these containers are duplicated on the server in '/var/lib/strong-pm/svc/1/work/current/client/storage/'. If I do some uploads the files are saved on the server but when I deploy a new version the files are removed.

当我部署我的项目时,这些容器在'/ var / lib / strong-pm / svc / 1 / work / current / client / storage /'中复制在服务器上。如果我进行一些上传,文件将保存在服务器上,但是当我部署新版本时,文件将被删除。

Should I be using '.git_ignore' in some way to prevent this behaviour?

我应该以某种方式使用'.git_ignore'来防止这种行为吗?

1 个解决方案

#1


0  

When you deploy the project it doesn't overwrites the previous project folder but recreates a new one.
So I dont think .gitignore may be the best way to solve this issue but the safest and better way would be to should create your storage location outside the scope of the main project folder.

部署项目时,它不会覆盖以前的项目文件夹,但会重新创建一个新项目。所以我不认为.gitignore可能是解决这个问题的最佳方法,但最安全和更好的方法是在主项目文件夹范围之外创建存储位置。

If possible don't store the images in your local filesystem instead fetch it through the Amazon S3 container or some other cloud service. Loopback provide very easy way to handle all this.

如果可能,请不要将映像存储在本地文件系统中,而是通过Amazon S3容器或其他云服务获取它。 Loopback提供了非常简单的方法来处理所有这些。

#1


0  

When you deploy the project it doesn't overwrites the previous project folder but recreates a new one.
So I dont think .gitignore may be the best way to solve this issue but the safest and better way would be to should create your storage location outside the scope of the main project folder.

部署项目时,它不会覆盖以前的项目文件夹,但会重新创建一个新项目。所以我不认为.gitignore可能是解决这个问题的最佳方法,但最安全和更好的方法是在主项目文件夹范围之外创建存储位置。

If possible don't store the images in your local filesystem instead fetch it through the Amazon S3 container or some other cloud service. Loopback provide very easy way to handle all this.

如果可能,请不要将映像存储在本地文件系统中,而是通过Amazon S3容器或其他云服务获取它。 Loopback提供了非常简单的方法来处理所有这些。