gpt_academic icon indicating copy to clipboard operation
gpt_academic copied to clipboard

临时参考方案:Run different projects with docker-compose profiles

Open k997 opened this issue 2 years ago • 4 comments

This commit introduces the usage of Docker Compose profiles to run different projects with varying functionalities. By utilizing the profiles feature, we can now manage and switch between different project configurations easily.

Changes made in this commit include:

  • Added Docker Compose profiles for organizing project configurations
  • Updated the README file to document the usage of profiles
  • Modified the docker-compose.yml file to include multiple profile definitions

这次提交引入了使用 Docker Compose 的 profile 功能来运行具有不同功能的项目。通过利用 profile 功能,我们现在可以轻松地管理和切换不同的项目配置。

本次提交的主要更改包括:

  • 添加了 Docker Compose 的 profile,用于组织项目配置
  • 更新了 README 文件,以记录 profile 的使用方法
  • 修改了 docker-compose.yml 文件,包含多个 profile 定义

k997 avatar Aug 06 '23 00:08 k997

⚠️ GitGuardian has uncovered 5 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- Generic High Entropy Secret f5f87d12ede70c4deae31c6beb02d0b090b1c4ff docker-compose.yml View secret
- Generic High Entropy Secret f5f87d12ede70c4deae31c6beb02d0b090b1c4ff docker-compose.yml View secret
- Generic High Entropy Secret f5f87d12ede70c4deae31c6beb02d0b090b1c4ff docker-compose.yml View secret
- Alibaba Cloud Keys f5f87d12ede70c4deae31c6beb02d0b090b1c4ff docker-compose.yml View secret
- Alibaba Cloud Keys f5f87d12ede70c4deae31c6beb02d0b090b1c4ff docker-compose.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

gitguardian[bot] avatar Aug 06 '23 00:08 gitguardian[bot]

谢谢您,这样方便不少,但是我花时间需要学习一下这种docker-compose写法,之后我可能会把x-environment去掉(依然希望所有的配置都锦簇地放在一起,避免把配置拆分到不同地方带来的理解上的歧义)

binary-husky avatar Aug 07 '23 15:08 binary-husky

相对通用的配置放在一起可以方便用户切换不同方案。以代理地址为例,本人只有一个代理地址,在尝试不同方案过程中需要为不同方案反复配置相同的环境变量,复制粘贴不同的services文件,进行了很多重复工作,因此提出这个pr。

k997 avatar Aug 10 '23 06:08 k997

image

Smiley23b avatar Oct 11 '23 02:10 Smiley23b