marigold-dev / tzsafe-ui

TzSafe-UI frontend — to interact with multi-signatures wallets.
https://www.marigold.dev/tzsafe
10 stars 2 forks source link

[Fix] fail to pass env #65

Closed rueshyna closed 1 year ago

rueshyna commented 1 year ago

Currently, tzsafe.marigold.dev is running on ghostnet due to wrong env.

There are two bugs here.

  1. In docker file, the arg in ARG will be wiped up after FROM so we couldn't make release image on mainnet.

    > docker run --name tzsafe  -p 20000:80 ghcr.io/marigold-dev/tzsafe:0.5.0-release
    > docker exec tzsafe cat /app/.env.local
    NEXT_PUBLIC_RPC_URL=https://ghostnet.tezos.marigold.dev/
    NEXT_PUBLIC_API_URL=https://api.ghostnet.tzkt.io
    NEXT_PUBLIC_NETWORK_TYPE=ghostnet
  2. according to the Next.js doc, the env variables have to be ready before npm run build.

    Note: In order to keep server-only secrets safe, environment variables are evaluated at build time