Skip to content

Docker Deployment of Medusa + Storefront #507

@pmessan

Description

@pmessan

I have a setup where I deploy this storefront and a medusa backend using docker (compose). I crafted a simple dockerfile for the storefront application, which copies the sources, installs the packeges using yarn and starts the server.
The docker compose build seems to work fine (following instructions here).

I run into an issue when I try to access the storefront on port 9000, where an error is thrown, mentioning that a valid publishable key is required to proceed.

Image

My workflow looks like this:

  • build and deploy using docker compose (backend + storefront)
  • login to admin panel with created user and retrieve publishable key
  • update env config and restart storefront container, updating env

Which is inconvenient, and means more complex management of storefront and backend instances.

So my question is: Is there a way I can acquire this key at build time or some other way, without having to restart the storefront?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions