Comments (2)
@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
..
from docker-strapi.
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.
from docker-strapi.
Related Issues (20)
- Strapi version 4.6.1 is out HOT 2
- Strapi Version 4.7.1 is out HOT 1
- Request hit localhost after deploy to production HOT 1
- The `ls` command of node:14-alpine does not recognize the `q` option
- Is VOLUME declaration really intended? HOT 1
- docker-compose file is invalid because DATABASE_SSL contains false, which is an invalid type
- Cannot initialize project - An error occurred while requesting the API HOT 3
- Why not enable multi arch/plaform build? HOT 1
- Warning: An error occurred while requesting the API HOT 3
- [BUG] Error: Cannot find module 'mysql' HOT 12
- Latest image not working HOT 5
- Cannot find module 'react' HOT 2
- arm support HOT 5
- Cant host on subdomain or different port HOT 3
- Exited with Code 0
- make: *** [sharp.target.mk:139: Release/obj.target/sharp/src/common.o] Error 1
- Warning: An error occurred while requesting the API HOT 3
- Container can't run, error: Node modules not installed HOT 1
- How to upgrade the application correctly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-strapi.