App hub in docker can't start up : Expected env INTERNAL_JWT_SECRET to be present

I got this error when run in docker-compose :

2022-09-06T10:06:01.620Z apphub:server:knexconfig process.env.RDS_HOSTNAME: app-hub_db_1
2022-09-06T10:06:01.621Z apphub:server:knexconfig process.env.RDS_USERNAME: app-hub
2022-09-06T10:06:01.622Z apphub:server:knexconfig process.env.RDS_DB_NAME: app-hub
2022-09-06T10:06:01.622Z apphub:server:knexconfig process.env.RDS_DB_PORT: undefined
throw new Error(Expected env ${envVar} to be present.)
Error: Expected env INTERNAL_JWT_SECRET to be present.
at getRequiredEnv (/srv/apphub/server/src/server/env-config.js:6:15)
at Object. (/srv/apphub/server/src/server/env-config.js:20:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object. (/srv/apphub/server/src/main.js:10:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)

1 Like

@linxd can you share some more information about what you are trying to do here? It looks as if you are running your own App Hub server, is that correct? If so, what is the use-case for setting this up and will you be mirroring the production App Hub ( or creating a dedicated repository?

It is technically possible, as you have found, to run your own copy of the App Hub however this is not a use-case we have optimized for, as it has not been used by anyone in production that we know of.

To answer your specific question - it is necessary to pass an INTERNAL_JWT_SECRET environment variable to the App Hub docker image. This secret is used to encrypt json web tokens for authentication.

1 Like

Thanks。 Just do a test for internal net for app-hub

1 Like