docker-medusa icon indicating copy to clipboard operation
docker-medusa copied to clipboard

Proposal to maintain this repo

Open micksatana opened this issue 10 months ago • 1 comments

Proposal

  • [ ] Add GitHub Actions to test build image on Node LTS versions (20, 22) and multi-arch (amd64, arm64)
  • [ ] Use multi-stage build and smallest image possible
  • [ ] Consolidate admin and backend folders to one Dockerfile and only provide the production Dockerfile
  • [ ] Remove storefront as they're now based on next.js which best docker example can be found in Next.js with-docker* examples
  • [ ] Test build image by using npx medusa new command to create a test project
  • [ ] Remove docker-compose files which a bit opinionated; some developers may deploy postgres and redis locally or some may deploy in colima, minikube, etc. Remove them and focus on Dockerfile.

I have developed the idea in https://github.com/micksatana/docker-medusa, if this is ok, I can open PR to this repo and maintain it here.

micksatana avatar Jan 30 '25 12:01 micksatana

You are a scholar and a saint sir. I've just had quite the hellish day getting a Dockerfile that actually runs. I slap yours in there and bam its done.

I hope your work here gets taken on board because this repo has next to 0 useful information.

nicolasdabreo avatar Feb 01 '25 20:02 nicolasdabreo

@srindom hoping this gets your attention.

vickywane avatar Apr 14 '25 21:04 vickywane

+1

webriq avatar Apr 28 '25 05:04 webriq

@micksatana I quite liked the idea of having other services (such as postgres) in a compose file. It makes it more easy to quickly deploy medusa locally.

I think you should add a docker-compose file with

  • required env variables
  • postgres
  • redis
  • medusa worker
  • medusa app

Furthermore, your Dockercompose file does not seem to work anymore (maybe it is because I'm on ARM). Unfortunately, I'm not an node expert so I can't really debug it.

MarcBresson avatar May 25 '25 07:05 MarcBresson

@micksatana I quite liked the idea of having other services (such as postgres) in a compose file. It makes it more easy to quickly deploy medusa locally.

I think you should add a docker-compose file with

  • required env variables
  • postgres
  • redis
  • medusa worker
  • medusa app

Furthermore, your Dockercompose file does not seem to work anymore (maybe it is because I'm on ARM). Unfortunately, I'm not an node expert so I can't really debug it.

Could you open an issue with a specific error message in my fork? I will have a look.

If you're using Node 24, it could be about Node 24.0.0 too. See detailed issue and root cause in https://github.com/micksatana/docker-medusa/pull/2

micksatana avatar May 26 '25 02:05 micksatana

Btw, in my fork and what I proposed here is to remove docker-compose because it's quite opinionated depending on what are technical requirements in each project; ie, some project may not use Redis (but Valkey instead), or set it up differently in their local (using minikube, etc).

So my aim is to provide production-ready Dockerfile for Medusa backend and maintain only what necessary.

If the issue you found is about Dockerfile, feel free to open an issue in my fork. If it's about docker-compose, may need other maintainer here.

micksatana avatar May 26 '25 05:05 micksatana

@micksatana big shoutout to you! Good dockerfile, I wasted hours already :D

raweber42 avatar Jul 19 '25 16:07 raweber42