Ok, let’s investigate this.
Could you make sure that:
NODE_ENV have the correct value in production.
- In production,
NODE_ENV should be
production. This is required to avoid regenerating a
.forestadmin-schema.json in production. This file should only be updated in a development environment.
APPLICATION_URL is used for the login step, which is the one that seems failing in your case
FOREST_ENV_SECRET must be at the value displayed in the
Deploy to production screen.
In order to debug this step, I would highly suggest to
console.log(process.env) on server startup. We have a lot of thread on the community having a similar issues that only has one of these 3 variables not set or incorrectly set.
Make sure that you have a
.forestadmin-schema.json in your docker image. When your backend starts with
NODE_ENV=production, this file will not be regenerated and it is required to setup a production environment. Some docker version have known issues with
./hidden files, especially at build time.
Try to access your production URL and make sure that you are seeing the “Your application is running” message
I use forest-cli project generation. What is in-app method?
in-app method uses an existing application to plug forest. Using the
forest-cli setup, we generate a backend for you.
Can’t realize how to deploy forestadmin in production env on kubernetes, is it even possible without pain?)
It is possible indeed. I would highly suggest to test your docker image locally though, just to check if the deployment fails because of a k8s misconfiguration - or simply because of missing files in your docker image.
NODE_ENV=devleopment i have no errors in logs but i got this in admin panel:
Please don’t put
NODE_ENV=development in a production environment. This will definitely cause issues related to authentication, schema generation, etc…
After you validate the points below, if you are still experiencing the issue mentionned here, you should have errors in your browser console. These errors will be helpful to assist you in the deploy to production process.
Let me know if that helps.