Skip to content

feat(cli): scaffold docker assets#69

Merged
dlukt merged 2 commits intomainfrom
codex/add-erm-docker-commands-and-compose-file
Oct 17, 2025
Merged

feat(cli): scaffold docker assets#69
dlukt merged 2 commits intomainfrom
codex/add-erm-docker-commands-and-compose-file

Conversation

@dlukt
Copy link
Contributor

@dlukt dlukt commented Oct 17, 2025

Summary

  • add an erm docker sync command that writes docker/local assets based on erm.yaml
  • have erm init call the shared sync helper so projects start with docker/local/docker-compose.yml and extension SQL
  • default extension flags to false in new configs and refresh related docs/tests

Testing

  • go test ./...

https://chatgpt.com/codex/tasks/task_b_68f2104cc608832eaa3b22e6f1bea836

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 239 to 250
func selectDockerImage(cfg projectConfig) (string, string) {
switch {
case cfg.Extensions.PostGIS && cfg.Extensions.Timescale && !cfg.Extensions.PGVector:
return "timescale/timescaledb-ha:pg16.2-ts2.14.2", "Includes TimescaleDB and PostGIS support."
case cfg.Extensions.PostGIS && !cfg.Extensions.PGVector && !cfg.Extensions.Timescale:
return "postgis/postgis:16-3.4", "Includes PostGIS support."
case cfg.Extensions.PGVector && !cfg.Extensions.PostGIS && !cfg.Extensions.Timescale:
return "pgvector/pgvector:pg16", "Includes the pgvector extension."
case cfg.Extensions.Timescale && !cfg.Extensions.PostGIS && !cfg.Extensions.PGVector:
return "timescale/timescaledb-ha:pg16.2-ts2.14.2", "Includes TimescaleDB support."
default:
return "postgres:16", "Use a custom image to bundle additional extensions."

Choose a reason for hiding this comment

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

P1 Badge Use Timescale image when timescaledb is enabled with pgvector

The Docker image selector falls back to plain postgres:16 whenever timescaledb and pgvector are both enabled, even though renderExtensionSQL still emits CREATE EXTENSION timescaledb. The stock Postgres image does not ship with TimescaleDB, so the generated docker-compose.yml will start a container that immediately fails when the init SQL runs. selectDockerImage should prefer a TimescaleDB-capable image whenever Timescale is true (and then document that pgvector must be added manually) rather than dropping support entirely when pgvector is also requested.

Useful? React with 👍 / 👎.

@dlukt dlukt merged commit 04d251e into main Oct 17, 2025
2 checks passed
@dlukt dlukt deleted the codex/add-erm-docker-commands-and-compose-file branch October 17, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant