Skip to content

docker-compose.yml hardcoded credentials #253

Description

@DeFiVC

Problem

In docker-compose.yml lines 8-10, database credentials are hardcoded:

environment:
  POSTGRES_USER: chainlearn
  POSTGRES_PASSWORD: chainlearn_dev
  POSTGRES_DB: chainlearn

Even for development, this should reference an .env file via env_file or ${POSTGRES_PASSWORD} variable substitution.

Fix

Use environment variables:

environment:
  POSTGRES_USER: ${POSTGRES_USER:-chainlearn}
  POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-chainlearn_dev}
  POSTGRES_DB: ${POSTGRES_DB:-chainlearn}

Scope

  • docker-compose.yml -- use environment variables

Acceptance Criteria

  1. Credentials are configurable via environment
  2. Default values work for development
  3. Existing functionality is not affected

Technical Context

  • docker-compose.yml:8-10 -- hardcoded credentials

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions