Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Enhancement request: don't refer to initdb from git repository

未關閉
#561 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
62/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
docker, postgresql
領域
databases, devops

研究方向

從 compose.yml 以及儲存庫中的其他 Compose 檔案開始,重點檢查 issue 中提到的 initdb volume mount。檢查容器啟動時在哪裡使用 Postgres seed,以及是否有指令碼假設 seed 檔案是已掛載的 git-path 相依項。更新 Compose/service 設定,使 seed 無需該 mount 即可完成 provision(並記錄所選擇的流程),然後執行 docker compose up,驗證本機 stack 在沒有儲存庫 seed volume 的情況下能正常啟動。

由索引模型根據 Issue 內容生成。

描述

design needed enhancement

Is your enhancement request related to a problem? Please describe.

I wanted to have a simple Docker setup for local use that wasn't intended for development but for using DejaCode. Therefore I had no need for building a Docker container or having a build environment. I was looking for a simple Docker Compose file with the necessary containers that exist.

I was surprised by the explicit volume mount of the Postgresql database seed:
https://github.com/aboutcode-org/dejacode/blob/c3399c8056d05eb0fbff13604ae4b3e8229a3bc0/compose.yml#L12

In this way the Docker compose files have a dependency on this git repository. This mount is present in all Docker compose files in this repository.

In the setup I came up with, I finally added the database seed to get it running. https://codeberg.org/nicorikken/aboutcode-locally

I'm surprised of the additional complexity of managing this database seed in a container-based setup. I would have expected a more implicit setup.

What are the benefits of the requested enhancement?

If the database seed would have been managed from within the built containers, the docker-compose setup would be simpler and would need nothing more than a docker-compose.yml file or maybe an nginx config and environment file if they aren't embedded into the compose file.

Describe the solution you would like

I would expect Dejacode to manage the database seed. I see a few options:

  1. Ship the database seed within the container. This risks the database seed having become outdated.
  2. Download the database seed at boot. This risks the download being blocked by the network. A manual install could be documented.

Additional notes

None

主要語言
Python
星號
52
分支
30
平均合併
4 小時 57 分鐘
30 天內合併 PR
21

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

aboutcode-org/dejacode 的其他 Issue

查看 aboutcode-org/dejacode 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。