{"id":20643150,"url":"https://github.com/medusajs/docker-medusa","last_synced_at":"2025-04-07T16:18:28.279Z","repository":{"id":37618876,"uuid":"433390675","full_name":"medusajs/docker-medusa","owner":"medusajs","description":"This repo is managed by the Medusa Community. Medusa does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.","archived":false,"fork":false,"pushed_at":"2024-01-22T21:59:35.000Z","size":23,"stargazers_count":205,"open_issues_count":16,"forks_count":105,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-31T14:14:17.005Z","etag":null,"topics":["docker","docker-compose","ecommerce"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/medusajs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["medusajs"]}},"created_at":"2021-11-30T10:39:35.000Z","updated_at":"2025-03-26T17:37:14.000Z","dependencies_parsed_at":"2025-01-30T08:11:17.376Z","dependency_job_id":"d576638a-262d-44fe-a835-156b859cc602","html_url":"https://github.com/medusajs/docker-medusa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medusajs%2Fdocker-medusa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medusajs%2Fdocker-medusa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medusajs%2Fdocker-medusa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medusajs%2Fdocker-medusa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/medusajs","download_url":"https://codeload.github.com/medusajs/docker-medusa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685628,"owners_count":20979085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","ecommerce"],"created_at":"2024-11-16T16:11:40.214Z","updated_at":"2025-04-07T16:18:28.254Z","avatar_url":"https://github.com/medusajs.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/medusajs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.medusajs.com\"\u003e\n    \u003cimg alt=\"Medusa\" src=\"https://user-images.githubusercontent.com/7554214/153162406-bf8fd16f-aa98-4604-b87b-e13ab4baf604.png\" width=\"100\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\n  Medusa\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n  \u003ca href=\"https://github.com/medusajs/admin\"\u003eMedusa Admin\u003c/a\u003e |\n  \u003ca href=\"https://www.medusajs.com\"\u003eWebsite\u003c/a\u003e |\n  \u003ca href=\"https://www.medusajs.com/blog\"\u003eBlog\u003c/a\u003e |\n  \u003ca href=\"https://www.linkedin.com/company/medusa-commerce\"\u003eLinkedIn\u003c/a\u003e |\n  \u003ca href=\"https://twitter.com/medusajs\"\u003eTwitter\u003c/a\u003e |\n  \u003ca href=\"https://docs.medusajs.com\"\u003eDocumentation\u003c/a\u003e |\n  \u003ca href=\"https://medusajs.notion.site/medusajs/Medusa-Home-3485f8605d834a07949b17d1a9f7eafd\"\u003eNotion\u003c/a\u003e\n\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\nMedusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/medusajs/medusa/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"Medusa is released under the MIT license.\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/medusajs/medusa/blob/master/CONTRIBUTING.md\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\" alt=\"PRs welcome!\" /\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://www.producthunt.com/posts/medusa\"\u003e\u003cimg src=\"https://img.shields.io/badge/Product%20Hunt-%231%20Product%20of%20the%20Day-%23DA552E\" alt=\"Product Hunt\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/xpCwq3Kfn8\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/chat-on%20discord-7289DA.svg\" alt=\"Discord Chat\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=medusajs\"\u003e\n    \u003cimg src=\"https://img.shields.io/twitter/follow/medusajs.svg?label=Follow%20@medusajs\" alt=\"Follow @medusajs\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n## Please note \nThis repo is managed by the Medusa Community. Medusa does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.\n\n**This project is inteded for development only at this time.**\n\nThe files for both the \u003ci\u003eMedusa server\u003c/i\u003e and the \u003ci\u003eStorefront\u003c/i\u003e are loaded in Bind Mounts allowing you to change the server functionality and have the change be hot-reloaded onto your running containers.\n\n\u003c/p\u003e\n\n---\n\n## Requirements\n\nTo use Docker with Medusa, you should have created a Medusa project. Check out our [Quickstart](https://github.com/medusajs/medusa#quickstart) to get started. \n\nAdditionally, you should have `docker` and `docker-compose` installed on your system.\n\n## Getting Started\n\nTo set up Medusa in a development environment with Docker, you should copy files `docker-compose.yml`, `docker-compose.override.yml, `backend/develop.sh`, and `backend/Dockerfile` to your Medusa project.\n\nThen build the images since they are not published on dockerhub. This is accomplished by adding the `--build` flag as shown below:\n\n```bash\ndocker compose up --build\n```\n\nHaving already built the Docker images you can run docker compose without the `--build` flag.\n\n```\ndocker compose up\n```\n\nYour local Medusa setup is now running with each of the services occupying the following ports:\n\n\u003cul\u003e\n  \u003cli\u003e\u003cb\u003eMedusa Server\u003c/b\u003e: 9000\n  \u003cli\u003e\u003cb\u003eMedusa Admin\u003c/b\u003e: 7000\n  \u003cli\u003e\u003cb\u003eStorefront\u003c/b\u003e: 8000\n  \u003cli\u003e\u003cb\u003epostgres\u003c/b\u003e: 5432\n  \u003cli\u003e\u003cb\u003eredis\u003c/b\u003e: 6379\n\u003c/ul\u003e\n\n_Note: If you change the dependencies of your projects by adding new packages you can simply rebuild that package with the same tag `test` and run `docker compose up` once again to update your environment._\n\n### Seeding your Medusa store\n\nTo add seed data to your medusa store run this command in a seperate\n\n```\ndocker exec medusa-server medusa seed -f ./data/seed.json\n```\n\n## Running Medusa with docker in production\n\nThis repository and each of the services contain dockerfiles for both development and production, named `Dockerfile` and `Dockerfile.prod` respectively. The `Dockerfile.prod` copies the local files from disk and builds a production ready image based on your local development progress. Your specific needs for a production like container might differ from the `Dockerfile.prod` but it should provide a template and an idea of the requirements for each of the basic services.\n\nTo run the services in a production state `docker compose` is simply run with the `docker-compose.production.yml` file as well as the basic `docker-compose.yml` file as seen below. If you wish to build the production ready images and then start them run `docker compose up` with the `--build` flag as described above.\n\n```\ndocker compose up -f docker-compose.yml -f docker-compose.production.yml up\n```\n\n`docker-compose.production.yml` contains production relevant overrides to the services described in the `docker-compose.yml` development file.\n\n## Try it out\n\n```\ncurl -X GET localhost:9000/store/products | python -m json.tool\n```\n\nAfter the seed script has run you will have the following things in you database:\n\n- a User with the email: admin@medusa-test.com and password: supersecret\n- a Region called Default Region with the countries GB, DE, DK, SE, FR, ES, IT\n- a Shipping Option called Standard Shipping which costs 10 EUR\n- a Product called Cool Test Product with 4 Product Variants that all cost 19.50 EUR\n\nVisit [docs.medusa-commerce.com](https://docs.medusa-comerce.com) for further guides.\n\n\u003cp\u003e\n  \u003ca href=\"https://www.medusa-commerce.com\"\u003e\n    Website\n  \u003c/a\u003e \n  |\n  \u003ca href=\"https://medusajs.notion.site/medusajs/Medusa-Home-3485f8605d834a07949b17d1a9f7eafd\"\u003e\n    Notion Home\n  \u003c/a\u003e\n  |\n  \u003ca href=\"https://twitter.com/intent/follow?screen_name=medusajs\"\u003e\n    Twitter\n  \u003c/a\u003e\n  |\n  \u003ca href=\"https://docs.medusa-commerce.com\"\u003e\n    Docs\n  \u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedusajs%2Fdocker-medusa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedusajs%2Fdocker-medusa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedusajs%2Fdocker-medusa/lists"}