Giter VIP home page Giter VIP logo

Comments (9)

raquelhortab avatar raquelhortab commented on September 12, 2024 1

@endigo I invited you, the branch I am working on is raquel/dockerize

from medusa.

endigo avatar endigo commented on September 12, 2024

Your NEXT_PUBLIC_* env variables are wrong. It should be localhost or ip of host

...
environment:
      - NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9000
      - NEXT_PUBLIC_BASE_URL=http://localhost:8000
      
 ...    

from medusa.

raquelhortab avatar raquelhortab commented on September 12, 2024

The http://back:9000) one is actually wrong, thanks! it should be backend due to the service name.
This is a docker compose environment, since back and front are not on the same container, localhost would not work. In docker compose, each service should be available like that, shouldn't it? see the DATABASE_URL @db ? that works just fine.

yet i changed it to backend and still not working, maybe there's somewhere else where it's wrong? @endigo

from medusa.

raquelhortab avatar raquelhortab commented on September 12, 2024

oh maybe I get it, since the browser needs to access it, backend and front ips would not always work either, let me check with 127.0.0.1 (although I am not sure the browser accesses :9000, it should be the frontend server who does right?)

from medusa.

raquelhortab avatar raquelhortab commented on September 12, 2024

also, 7001 is not working either, with no error at all:

the logs suggest it should work:

geekle_ia-backend-1  | 11:13:46 PM [@medusajs/admin] Started development server on http://localhost:7001/
geekle_ia-backend-1  | <i> [webpack-dev-server] Project is running at:
geekle_ia-backend-1  | <i> [webpack-dev-server] Loopback: http://localhost:7001/, http://127.0.0.1:7001/
geekle_ia-backend-1  | <i> [webpack-dev-server] Content not from webpack is served from '/app/public' directory
geekle_ia-backend-1  | <i> [webpack-dev-server] 404s will fallback to '/'

from medusa.

endigo avatar endigo commented on September 12, 2024

@raquelhortab can you share an example repo that I can help you out here?

from medusa.

raquelhortab avatar raquelhortab commented on September 12, 2024

I changed the compose file to this:

environment:
  - NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://127.0.0.1:9000
  - NEXT_PUBLIC_BASE_URL=http://127.0.0.1:8000
 network_mode: host

and still not working but now I get a redirect

image

Yes, let me send an invitation, just a sec @endigo

from medusa.

raquelhortab avatar raquelhortab commented on September 12, 2024

note: I saw I could not access either backend:9000 not 127.0.0.1:backend from the front container so I added network_mode: host and now I can access

from medusa.

sradevski avatar sradevski commented on September 12, 2024

Hey, thanks for being interested in Medusa, that's great to hear! We reserve Github issues for bug reports, and since this seems to be more of a question on docker compose, please head to our Discord channel to get help from the community. Thanks!

from medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.