Comments (7)
Hey, glad it could be helpful to you!
I am assuming your nginx/default.conf
looks something like:
upstream ui {
server client:3000;
}
In the code I have it's ui:3000
, which afaik should be the name of your Docker service for front-end/client in the docker-compose.yaml
, so in my code it's be line 51.
So just try checking that it's all mapped correctly using the same values, that's be my best guess 🤔
from full-stack-js-docker-tutorial.
It is odd, I have that. Okay, so one thing that seemed to be causing it was setting the container_name: in the docker-compose.yml. Did you manage to get this working locally? Now, when I attempt to connect to the localhost:4000 (the nginx service), I get Invalid Host header
shown in the browser. I really appreciate the quick response. Thank you again...
from full-stack-js-docker-tutorial.
Hey again, I am not sure exactly what might be causing that to be honest, however I tried pulling the repo again and try to build and start it from scratch and I ran into an issue where both server and ui services were missing their node_modules folders, so maybe that was causing issues for you as well.
I have pushed a fix now that made things working again for me, maybe that'll fix the issue you're having?
from full-stack-js-docker-tutorial.
It is not that. Does this all work for you locally, so you can hit nginx at localhost:8008 and it redirects to the client and then to the server correctly? I am not getting "Cannot GET /<some_id>"... I am very confused. I assume that this should be demonstratable at localhost?
from full-stack-js-docker-tutorial.
Yes, sorry if that wasn't clear. I have tried running the cloned repo locally and am able to access it via nginx (8008) as well as separate ui and server services under their own ports. As I mentioned though I had an issue with node_modules that I had to patch.
But yes, it all works on localhost for me after clean clone.
What happens when you try accessing services by their own port? What about running ui and server services directly, without compose, by just building and upping them from their own folder?
I would look there trying to identify what the issue might be, is it one of the services or the nginx pulling it together or docker-compose messing up.
Also looking up the error you mentioned gave me a couple of threads about needing to do something in your webpack or whichever live server config you are using.
I know compose logs are not the most readable, but anything jumping out at you when the services are trying to come up?
from full-stack-js-docker-tutorial.
Hi, thank you, I have it working as expected. Thank you very much for your time with this - it was most appreciated.
from full-stack-js-docker-tutorial.
Happy to help and to hear you got it working! Out of curiosity, what was it in the end?
from full-stack-js-docker-tutorial.
Related Issues (1)
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 full-stack-js-docker-tutorial.