Closed ilyinon closed 1 year ago
Hi, I had similar problem (it was trying to reach localhost). I removed all env variables from my docker compose, I manually edited ./config/server.js to add :
module.exports = ({ env }) => ({ host: env('HOST', '0.0.0.0'), port: env.int('PORT', 1337), url: env('PUBLIC_URL', 'https://youraddresshere'),
Then you have to docker exec inside the container, run "strapi build", restart the container.
@Elu43 thank you a lot! It works.
I've added updated server.js to the dockerfile, steps with copying server.js and running "strapi build" to entrypoint.sh and after these steps it works like a charm!
Dockerfile
..
COPY docker-entrypoint.sh /usr/local/bin/
COPY server.js /srv/server.js
..
docker-entrypoint.sh
..
$EXTRA_ARGS
cp -f /srv/server.js /srv/app/config/server.js
strapi build
elif [ ! -d "node_modules" ] || [ ! "$(ls -qAL node_modules 2>/dev/null)" ]; then
..
Hi!
I would like to ask you help to solve the issue when you deploy the image ( the latest one) to kubernetes. It is up and running and it is available thru ingress, yet /admin doesn't work properly and you can see the following errors in the console.
strapi has the following output
and I pass the ADMIN_URL and PUBLIC_URL ADMIN_URL=https://strapi.domain/admin PUBLIC_URL=https://strapi.domain