Skip to content

How to serve env for frontend in runtime with docker #77448

Open
@ebharathi

Description

@ebharathi

Link to the code that reproduces this issue

https://github.com/ebharathi/nextauth-prisma-graphql

To Reproduce

Documentation only provides steps to embed env in build time rather than run time which is not ideal
This is an issue i have been facing for a long time now. I know it can be solved by running bash to replace a string with env. But this just makes the use of NEXT_PUBLIC_envs not useful ? i mean whats the purpose if we could do it in dev but not in prod using docker.

Current vs. Expected behavior

current: frontend envs are served during only build time with docker
expected: allow envs for frontend in runtime with docker

Provide environment information

Lunix

Which area(s) are affected? (Select all that apply)

Runtime

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeRelated to Node.js or Edge Runtime with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions