Docker Node, React, MongoDB - Part 2

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

ความคิดเห็น • 5

  • @Denvercoder
    @Denvercoder 4 ปีที่แล้ว

    Thanks for getting around to this.

  • @MayorMuric
    @MayorMuric 4 ปีที่แล้ว

    Hey, man. You mentioned how we can refer to "db" instead of localhost. Does this extend to api request urls and cors origin urls? Mostly wondering about production.

  • @Denvercoder
    @Denvercoder 4 ปีที่แล้ว +1

    Hey, I did all of this, (using my own project), and it looks like everything is working except that I fudged the API_URL and had "localhost:3001" instead of "localhost:3001/api".
    I ran docker-compose down,
    updated the .env file,
    saved the .env file,
    ran docker-compose up
    but it still has
    localhost:3001/signup
    in the request URL instead of
    localhost:3001/api/signup
    Is there something I have to do to get it to grab the new .env file?

    • @mitchel3392
      @mitchel3392 4 ปีที่แล้ว

      I also thought docker-compose would save the new changes, however, you need 'docker-compose build' to do this. After this you can run docker-compose up again and it should work. Btw, sometimes the build command can be corrupted; in this case you can run 'docker-compose up --force-recreate --build -d
      '.

  • @F_S_A
    @F_S_A 4 ปีที่แล้ว +1

    Thanks, set SSL please