Skip to content

Theme seeding must run during migrate step (not manual docker run) #513

@tayebmokni

Description

@tayebmokni

Summary

The api container expects themes at `/themes` (named volume `api-themes` in compose). After `docker compose down -v` the volume is empty and the customizer 500s with "failed to load theme 'gn-hello'".

The fix during the recent session was to manually `docker run --rm -v api-themes:/themes alpine cp` from the repo's `themes/` directory. Not persistent, not documented.

Fix

The `migrate` service (`cli/gonext` Dockerfile already COPYs `themes/` to `/themes` at line ~42) should ensure the volume is seeded as part of its idempotent boot:

  1. On migrate run, check if `/themes/gn-hello` exists in the volume.
  2. If not, copy from the image's bundled `/themes` (where the Dockerfile dropped them).
  3. Make this part of the existing `gonext migrate` command, or add a `gonext seed-themes` subcommand the migrate service calls.

Files to touch

  • `cli/gonext/cmd/init/` or `cli/gonext/cmd/migrate/` — add theme-seed step
  • `docker-compose.dev.yml` — verify migrate service mounts `api-themes` (currently only `api` mounts it)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions