This means that the application has to be built with the NEXT_PUBLIC_BASE_URL
already set, instead of allowing it to be filled later.
Such practice, prevents users from using the already built application (being it inside/outside of docker).
How to reproduce:
1 - Make sure you're working on a clean environment (identical to repo)
2 - Build the application
npm install
npm run build
3 - Create your .env.local
file with the your configs (firebase and public url)
cat >> .env.local << EOF
NEXT_PUBLIC_BASE_URL="http://127.0.0.1.xip.io:3000/"
RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=false
SECRET_KEY=""
STORAGE_BUCKET="blablabla.appspot.com"
PROJECT_ID="blablabla"
AUTH_DOMAIN="balblabla.firebaseapp.com"
MEASUREMENT_ID="G-BLABLABLA"
APP_ID="9:999999999999:web:9a9a9a9a9a9a9a9a9a9a"
MESSAGING_SENDER_ID="999999999999"
API_KEY="asdadasdasdsadasd_asdasdasdasd-123asd123"
EOF
4 - Start the application
Expected
1 - Navigate to http://127.0.0.1.nip.io:3000/
2 - Open preferred Developer tools
and go to the network tab
3 - Fill in any URL on the webpage and click on the button Light It Up ๐ฅ
4 - A POST request is shown on the network tab
aimed at http://127.0.0.1.xip.io:3000/
Actual
1 - Navigate to http://127.0.0.1.nip.io:3000/
2 - Open preferred Developer tools
and go to the network tab
3 - Fill in any URL on the webpage and click on the button Light It Up ๐ฅ
4 - A POST request is shown on the network tab
aimed at http://localhost:3000/
Temporary workaround
While this issue doesn't get fixed, might be worth it to change documentation to:
Application
Instruct users to build application with the .env.local
already created and filled as first step.
Docker
Stop distributing ready-to-use docker image and change docker-compose to force user to build its own docker-image