Skip to content

Remove hard-coded credentials from docker-compose.yml - #289

Merged
barnstee merged 2 commits into
mainfrom
copilot/remove-hard-coded-creds
Jul 22, 2026
Merged

Remove hard-coded credentials from docker-compose.yml#289
barnstee merged 2 commits into
mainfrom
copilot/remove-hard-coded-creds

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

docker-compose.yml shipped hard-coded PostgreSQL, service, and pgAdmin credentials. These are now supplied via environment variables loaded from a git-ignored .env file.

Changes

  • docker-compose.yml — Replaced literal credentials with ${VAR} substitutions across all three services:
    • Connection string → ${POSTGRESQL_USERNAME} / ${POSTGRESQL_PASSWORD} / ${POSTGRESQL_DATABASE}
    • ServicePassword${SERVICE_PASSWORD}
    • Postgres POSTGRES_USER/PASSWORD/DB, pgAdmin PGADMIN_DEFAULT_EMAIL/PASSWORD, and the pgpassfile entrypoint line
  • .env.example — New template enumerating the required variables; developers copy it to .env.
  • .gitignore — Ignore .env so real credentials stay out of source control.
  • README.md — Development setup now includes the copy-.env.example-to-.env step.
environment:
    ConnectionStrings__CloudLibraryPostgreSQL: "Server=db;Username=${POSTGRESQL_USERNAME};******;Database=${POSTGRESQL_DATABASE};Port=5432;Ssl Mode=Prefer"
    ServicePassword: ${SERVICE_PASSWORD}

Notes

  • .env.example retains the prior uacloudlib defaults purely as placeholder values for local dev convenience; the actual .env is untracked.
  • docker compose config resolves all variables from .env as expected.

@barnstee barnstee added the bug Something isn't working label Jul 22, 2026
Copilot AI linked an issue Jul 22, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Remove hard-coded credentials from docker_compose.yaml Remove hard-coded credentials from docker-compose.yml Jul 22, 2026
Copilot AI requested a review from barnstee July 22, 2026 06:22
@barnstee
barnstee marked this pull request as ready for review July 22, 2026 06:31
@barnstee
barnstee merged commit 6d35034 into main Jul 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove hard-coded creds from docker_compose.yaml

2 participants