Skip to content

Should next-runtime-env work with Docker and docker-compose? #40

@YerayAlonso

Description

@YerayAlonso

I've tested the package and it works wonderfully in the examples you provide 🎉.
However, I fail to make it work with Docker and Docker Compose 🥀.

The idea would be to define the variables in a .env next to the docker.compose.yml, not next to the nextjs project. Then, pass the variables to the container at the startup.

I've prepared an example here.
I get undefined at the client side.
Note the __ENV.js file is present, but empty (window.__ENV = {}).

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