A dockerized version of Medusa Server Stack with Traefik, PostgreSQL, Minio, MeiliSearch, and Stripe Payment Gateway.
- docker and
- docker-compose
The Medusa server stack consists of the following components:
- Traefik + Dashboard: A popular reverse proxy and load balancer.
- PostgreSQL: A powerful and open-source relational database system.
- Minio: An open-source object storage server compatible with Amazon S3 APIs.
- MeiliSearch: A fast and easy-to-use search engine.
- Stripe Payment Gateway: A payment gateway that allows you to accept payments securely and easily.
To deploy the Medusa server stack on your VPS, follow these steps:
Clone the repository to your VPS.
git clone [email protected]:beakman/medusa-stack-dockerized.git
Navigate to the medusa-stack-dockerized directory.
cd medusa-stack-dockerized
Initialize the git submodule for the medusa-starter.
git submodule update --init --recursive
Create a .env file from the .env.example file and set your environment variables.
cp .env.example .env
vim .env
- MEDUSA_DOMAIN=example.com
- MINIO_DOMAIN=minio.example.com
- MINIO_CONSOLE_DOMAIN=minio-console.example.com
- MEILI_DOMAIN=search.example.com
- TRAEFIK_DOMAIN=traefik.example.com
- EMAIL=[email protected]
- CERT_RESOLVER=letsencrypt
- CLOUDFLARE_EMAIL=
- CLOUDFLARE_API_KEY=
- CLOUDFLARE_DNS_API_TOKEN=
- TRAEFIK_PASSWORD_HASH= user and password, hashed using MD5, SHA1, or BCrypt
Refer to https://dash.cloudflare.com/profile/api-tokens to get your CloudFlare tokens.
Start the stack.
docker compose up -d
This command will start all the services in the stack in the background.
Check run logs.
docker compose logs -f
Or service specific:
docker compose logs -f meilisearch
Populate install with sample data:
docker compose exec -it backend medusa seed -f data/seed.json
Cleaning previous installations:
docker compose down
docker system prune -a -f --volumes
docker volume rm $(docker volume ls -q)