简体   繁体   English

ddev 和 TYPO3:如何为多个开发人员处理数据库和文件管理

[英]ddev and TYPO3: how to handle the DB and fileadmin for multiple developers

how do you handle user upload folders like fileadmin and the DB with ddev and TYPO3.您如何使用 ddev 和 TYPO3 处理用户上传文件夹,如 fileadmin 和 DB。

I would like to have the DB and media files outside of my ddev container as both can get really large over time and I don't want to sync them every time.我想将数据库和媒体文件放在我的 ddev 容器之外,因为随着时间的推移它们都会变得非常大,我不想每次都同步它们。 Or do I have to?还是我必须这样做?

It would be awesome to just have them on a central server where every developer has access to.将它们放在每个开发人员都可以访问的中央服务器上会很棒。

For the DB it is not the problem.对于数据库来说,这不是问题。

But as far as I know to mount the fileadmin outside of the ddev container is not possible.但据我所知,将 fileadmin 挂载到 ddev 容器之外是不可能的。

How do you handle the DB and media files?你如何处理数据库和媒体文件?

For the companies I've worked for data for a development environment is either (1) rsynced from a central server or (2) have a minimal data set which is added to the git repository.对于我为开发环境的数据工作的公司,要么(1)从中央服务器进行 rsync,要么(2)将最小数据集添加到 git 存储库中。

In case of option 1 there's usually an automated process which pulls data from production servers and cleans it up (removing cache/logs, anonymize any sensitive data, etc).在选项 1 的情况下,通常有一个自动化过程从生产服务器中提取数据并清理它(删除缓存/日志,匿名任何敏感数据等)。 The advantages of this option are you have (mostly) real data for your development environment and there's no need to manually manage a separate data set.此选项的优点是您拥有(大部分)开发环境的真实数据,无需手动管理单独的数据集。 The disadvantages are you might not have data to test all situations, data can get large and there's a chance you might miss sensitive data which could lead to data leaks.缺点是您可能没有数据来测试所有情况,数据可能会变得很大,并且您可能会错过可能导致数据泄漏的敏感数据。

In case of option 2 there's usually a way to generate random data to get a more filled development environment.在选项 2 的情况下,通常有一种方法可以生成随机数据以获得更充实的开发环境。 The advantages to this option are you have a clean development environment, the data set is as small as it can be and there's no chance of leaking sensitive data.此选项的优点是您拥有干净的开发环境,数据集尽可能小,并且没有泄露敏感数据的机会。 The disadvantages are you need to maintain a separate minimal data set, problems related to specific data might be harder to debug.缺点是您需要维护一个单独的最小数据集,与特定数据相关的问题可能更难调试。

Personally I think 2 is the better option.我个人认为2是更好的选择。 You should not need production data for development as long as you have a good way to create realistic random data.只要您有创建真实随机数据的好方法,您就不需要生产数据进行开发。 Production data might actually miss a lot of situations you do need for development.生产数据实际上可能会遗漏很多您确实需要进行开发的情况。 Some content elements might not always be used, things like empty news lists might not happen (often) in production, etc. I also don't want to have to download several Gb of data if I have to change a small thing in a project I don't have locally yet.一些内容元素可能并不总是被使用,像空新闻列表这样的事情可能不会在生产中(经常)发生等。如果我必须在项目中更改一个小东西,我也不想下载几 Gb 的数据我本地还没有。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM