Skip to content

docker-compose env_file 추가#24

Merged
chungjeongsu merged 1 commit into
developfrom
chore/docker-compose
Apr 7, 2026
Merged

docker-compose env_file 추가#24
chungjeongsu merged 1 commit into
developfrom
chore/docker-compose

Conversation

@chungjeongsu

Copy link
Copy Markdown
Contributor

No description provided.

@chungjeongsu chungjeongsu merged commit 2029461 into develop Apr 7, 2026
2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the docker-compose.yml file to include an .env file and removes the hardcoded SECONDARY_JWT_SECRET. The review feedback suggests using variable interpolation in the environment section to ensure that values from the .env file can properly override defaults, as hardcoded values in the environment block currently take precedence over the env_file definitions.

Comment thread docker-compose.yml
Comment on lines +6 to 11
env_file:
- .env
environment:
PORT: "1234"
SECONDARY_JWT_SECRET: "change-me"
Y_LEVELDB_PATH: "/data/y-leveldb"
MAX_USERS_PER_ROOM: "20"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

현재 environment 섹션에 일부 값이 하드코딩되어 있어 .env 파일에 동일한 변수를 정의하더라도 무시되는 구조입니다 (Docker Compose에서 environment 섹션은 env_file보다 우선순위가 높습니다). 또한 필수 변수인 SECONDARY_JWT_SECRET이 명시되지 않아 가독성이 떨어집니다. 아래와 같이 변수 참조 방식을 사용하면 .env를 통한 유연한 설정이 가능해지며, 필요한 환경 변수 목록을 명확히 파악할 수 있습니다.

    env_file:
      - .env
    environment:
      PORT: "${PORT:-1234}"
      SECONDARY_JWT_SECRET: "${SECONDARY_JWT_SECRET}"
      Y_LEVELDB_PATH: "${Y_LEVELDB_PATH:-/data/y-leveldb}"
      MAX_USERS_PER_ROOM: "${MAX_USERS_PER_ROOM:-20}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants