HI Simen,
A month ago a submitted an error with screen dumps when connecting the docker container to Heroku.
I am able to serve the web url of the app, but when adding the admin url to it, I get the following error:
"Warning, an error occurred while requesting the api"
You mentioned then that there was a change in strapi.
Will update the guide, but there was a change in 4.0.8 I think
After correcting for some the errors regarding plugins.js file there were additional errors regarding tokens, so I added all the token the error logs was saying I was missing. No all the errors are gone, and I get to the app url but not the admin url.
Your last reply a month ago:
Thank you i'm currently working on today to upgrade to 4.1.12 with the changes :)
Do you know when we can expect the update? It seems me and @EzequielLamonica are stuck on the samme issue. Any update will be highly appreciated :)
Can I use simply npm instead of yarn as also in the last of the deploy with heroku doc in strapi there is yarn add and yarn.lock commit steps I am confused 😕
Hi SImen,
I have just followed your excellent tutorial on setting straps/docker on heroku. My build goes through without any errors, but when opening my web url, I get the following message:
Application error An error occurred in the application and your page could not be served
When I look at the heroku logs with
heroku logs --tail
I am getting some errors, particularly the following:
debug: ⛔️ Server wasn't able to start properly.
error: Missing jwtSecret. Please, set configuration variable "jwtSecret" for the users-permissions plugin in config/plugins.js (ex: you can generate one using Node with `crypto.randomBytes(16).toString('base64')`).
For security reasons, prefer storing the secret in an environment variable and read it in config/plugins.js. See docs.strapi.io/developer-docs/latest/setup-deploy…
at=error code=H20 desc="App boot timeout" method=GET path="/" host=strapi4ps.herokuapp.com request_id=0cf66af8-0af5-4add-ac52-63a7ddb46c6f fwd="31.208.24.149" dyno= connect= service= status=503 bytes= protocol=https
at=error code=H10 desc="App crashed" method=GET path="/" host=strapi4ps.herokuapp.com request_id=c03a6f4f-e173-44c6-a99c-44a9091b4ea1 fwd="31.208.24.149" dyno= connect= service= status=503 bytes= protocol=https
It seems to me that when I created the straps project, there is no such file called plugins.js in the config folder. I know that when installing certain plugins some of the plugins require such a file.
And my jwt token is set in a .env file not uploaded to git as its in my .gitignore
Getting some problems in build time in heroku with docker. custom plugins. how can i solve this?
Building your admin UI with $NODE_ENV configuration ...
ℹ Compiling Webpack
ModuleNotFoundError: Module not found: Error: Can't resolve '@ckeditor/ckeditor5-build-classic' in '/opt/app/src/plugins/wysiwyg/admin/src/components/Editor'
at /opt/node_modules/webpack/lib/Compilation.js:2011:28
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:795:13
at eval (eval at create (/opt/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:275:22
at eval (eval at create (/opt/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:431:22
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:124:11
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:667:25
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:852:8
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:972:5
at /opt/node_modules/neo-async/async.js:6883:13
at /opt/node_modules/webpack/lib/NormalModuleFactory.js:955:45
at finishWithoutResolve (/opt/node_modules/enhanced-resolve/lib/Resolver.js:312:11)
at /opt/node_modules/enhanced-resolve/lib/Resolver.js:386:15
at /opt/node_modules/enhanced-resolve/lib/Resolver.js:435:5
at eval (eval at create (/opt/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
resolve '@ckeditor/ckeditor5-build-classic' in '/opt/app/src/plugins/wysiwyg/admin/src/components/Editor'
Parsed request is a module
using description file: /opt/app/src/plugins/wysiwyg/package.json (relative path: ./admin/src/components/Editor)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
I've tried adding in package.json "workspaces": [ "./src/plugins/*" ]
and it dindn't worked out
I think its beacuse of ENV PATH /opt/node_modules/.bin:$PATH in dockerfile
does it make anysense to you?
And what is the size of the docker image that it produces?
What is the benefit of running it in the docker image on Heroku vs traditional git-based deployment?
heroku config:set NODE_ENV=production › Error: Missing required flag: › -a, --app APP app to run › command › against › See more help with --help
Mine is not working, what is this error?
Wrong repo link at the bottom, should be strapi-heroku not strapiheroku :)
av
kalle
After giving up on publishing the strapi container on Heroku, I tried out load my container on DigitalOcean instead. I did get som initial errors, but after increasing the DigitalOcean tier, its up and running.
I wonder if this could the issue on Heroku too? As I am able to serve the website url, but not the admin page, giving the error of:
i will try change the Heroku tier from the free hobby dev server, and see if that solves the issue.