Skip to content

Latest commit

 

History

History
140 lines (98 loc) · 3.38 KB

README.md

File metadata and controls

140 lines (98 loc) · 3.38 KB

Table of contents:

  1. About
  2. Technical
  3. Screenshots
  4. Deployment

About

Store Docker is an e-commerce solution for businesses interested in starting to sell online. It is a full featured application, with everyting a modern online store should have, including:

  • Modern design
  • Smooth user experience
  • Custom checkout
  • Cart
  • Product search, sort and filter
  • Order tracking
  • Powerful admin dashboard - powered by medusa.js

Technical

Frontend:

  • TypeScript
  • Next.js (app/ directory, with the focus on SSR with server actions)
  • React.js
  • Jotai (Redux alternative)
  • TailwindCSS

Backend:

  • Medusa.js
  • PostgreSQL
  • Redis
  • Stripe
  • Meilisearch (self-hosted algolia alternative)
  • Caddy web server (nginx alternative)

Dev-ops:

  • Docker
  • Linux running on VPS / Cloud server

The application is containerized in a single docker compose, making it easy to deploy on any VPS or Cloud server. To host your own e-commerce store you just have to clone this repository on your VPS / Cloud server, configure your environment and run start.sh script. You can read more about this in the Deployment section.

Screenshots

store-landing store-product-grid store-product-page store-cart store-checkout medusa-dashboard

Deployment

Prerequisites

  • VPS or Cloud server with SSH access
  • Domain name with ability to change DNS records

This guide assumes that you have ubuntu 24.04 LTS server with root access.

Installing Docker

Follow the official Docker installation guide for Ubuntu

Steps

Follow the steps below to deploy the application:

  1. Clone the repository
git clone https://github.com/AleksaSimovic1/store-docker
  1. Using prepare.sh script, configure project variables
cd store-docker

# You may need to make the scripts executable
chmod +x prepare.sh start.sh stop.sh seed.sh migrate.sh

./prepare.sh
  1. Configure .env file with your own values
nano .env

# You may want to edit the following variables:
# DEFAULT_COUNTRY
# NEXT_PUBLIC_COMPANY_NAME
# NEXT_PUBLIC_COMPANY_DESCRIPTION
# EMAIL_SENDER_ADDRESS
# EMAIL_SENDER_PASSWORD
# EMAIL_HOST
# STRIPE_PUBLISH_KEY
# STRIPE_WEBHOOK_SECRET
# STRIPE_API_KEY

# After editing the file
# ctrl+o (save the file)
# hit enter to save it in current location
# ctrl+x (exit back to console)
  1. Migrate the .env file
# You will need to run this script every time you make changes to the root .env file

./migrate.sh
  1. Start the application
./start.sh
  1. Run seed.sh script to seed the store with sample data and add a superuser account
./seed.sh
  1. Setup DNS records for the application
Hostname DNS Record Type Value
@ A <VPS_IP_ADDRESS>
  1. That's it!