Closed ctmbl closed 1 year ago
I was getting with nginx container the following error:
iscscfr-nginx-1 | 2023/03/30 13:57:46 [emerg] 9#9: host not found in upstream "react-app" in /etc/nginx/nginx.conf:40
00d0912 have fixed it but still the backend doesn't reach mongo DB
This PR will stay idle for a while because we'll be working on two major changes that'll affect it:
This PR is not a draft anymore! @atxr @amtoine
Can you add in the readme
how to launch the container for development mode? My guess is that it isnt much different from production mode, but as of now the readme
still has the old instructions with node
etc...
@gbrivady good point! tks for noticing it I completely forgot to update the readme, but as you guessed it's really simple just run docker-compose --env-file .env.development -f docker-compose-dev.yml up
optionally you can add -d
for detach
mode (running in background) and --build
for rebuilding the images (which will be done anyway if you're running it for the first time)
I'll uipdate the README.md really soon!
Let's wait for #95 here
@gbrivady good point! tks for noticing it I completely forgot to update the readme, but as you guessed it's really simple just run
docker-compose --env-file .env.development -f docker-compose-dev.yml up
optionally you can add-d
fordetach
mode (running in background) and--build
for rebuilding the images (which will be done anyway if you're running it for the first time)I'll uipdate the README.md really soon!
Got a bunch of errors when I tried your command:
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"REACT_LOCAL_PORT\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"REACT_LOCAL_PORT\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"SERVER_NAME\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"MODE\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"DB_PORT\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"DB_PORT\" variable is not set. Defaulting to a blank string."
time="2023-05-04T19:08:13+02:00" level=warning msg="The \"DB_PORT\" variable is not set. Defaulting to a blank string."
1 error(s) decoding:
* error decoding 'Ports': No port specified: :<empty>
I think I might have issues with my .env file; maybe there is a way to fix it without resending me a complete dev one?
Yes indeed, looks like the port is missing in your env file Nevertheless, we should wait for #95 before working on this one because it might change some stuff. I think @ctmbl will share his .env to us once everything is ready
@amtoine @atxr @gbrivady
I don't understand everything
No problem! the point isn't to be an epxert on everything but: 1- to learn some things 2- to ask the naive/right questions in order for me to question my choices and know what I did wrong or what's unclear!
but in frontend/package-lock.json half of the time you replace "dev" : true, with "devOptionnal" : true, And the rest of the time you just delete it : it is normal ?
Very good question in fact!
I wondered too why this change occurred and lost almost 1hour figuring it out 🥲
After reading a bit of npm documentation this is simply because for the new dependency I added in 301f26c these subdependencies become Optional, so the mega changes to the package-lock.json
Tks for bringing up the issue!
@Laudut
Will do this evening 🚒
@atxr tks!
Thanks to b0ab27d, everything is working on my side! Let's merge this :field_hockey:
Had to try twice to make it work, but with the help of @ctmbl to clean and re-install everything it is working, so I'm going to suppose it was an error on my side.
Anyway thanks for the scripts and the updated readme
, much better and simpler that way to test everything!
Good to go for me then :rocket:
Close #64
This PR adds
Dockerfile
s anddocker-compose
file as well as a nginx conf template for development mode. The main differences with the prod mode are:What solutions I chose
node_modules
are in the image, so they don't overlap with one that could exists on home system, also we don't share the whole frontend and backend folder so localnode_modules
don't overlap with containerized oneWhat still needs to be done/doesn't satisfy me
docker-compose-dev.yml
) --> tested well on fc1c601MODE=$MODE ./run_nginx.sh
innginx/Dockerfile
isn't really beautiful I'd sayAppendices
(1)
(2)