-
-
-## Please note
-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.
-
-**This project is inteded for development only at this time.**
-
-The files for both the Medusa server and the Storefront are loaded in Bind Mounts allowing you to change the server functionality and have the change be hot-reloaded onto your running containers.
-
-
+# Static Website with AWS S3, GitHub Actions, and Netlify
+
+This project demonstrates how to deploy a static website using **AWS S3**, **GitHub Actions**, and **Netlify** to enable a seamless Continuous Integration and Continuous Deployment (CI/CD) pipeline. We also explore why **Netlify** was chosen over Cloudflare and S3 directly for hosting.
+
+## Project Overview
+
+This project automates the deployment of a static website through the following process:
+
+1. **GitHub Actions**: Automates the deployment pipeline when changes are made to the GitHub repository.
+2. **AWS S3**: Hosts the static files (HTML, CSS, etc.) of the website.
+3. **Netlify**: Simplifies deployment and automatically provides HTTPS, enabling a secure connection to the website.
+4. **CI/CD Workflow**: Every time you push changes to the GitHub repository, **GitHub Actions** ensures that the website is deployed automatically to **Netlify** for public access.
+
+### Tools Used:
+
+* **GitHub Actions**: To automate deployment whenever changes are pushed to the GitHub repository.
+* **AWS S3**: Used for hosting the static files of the website.
+* **Netlify**: Provides seamless integration for deploying the website with automatic HTTPS support and continuous deployment.
+* **Cloudflare**: Initially considered for DNS management and HTTPS, but ultimately not required for the free deployment flow with **Netlify**.
---
-## Requirements
+## Steps We Followed
+
+### 1. **Create a Static HTML Site**
+
+We began by designing a simple static HTML site using basic HTML and CSS to demonstrate the deployment. The structure consisted of:
+
+* `index.html`
+* `style.css`
+* `README.md`
+
+
-To use Docker with Medusa, you should have created a Medusa project. Check out our [Quickstart](https://github.com/medusajs/medusa#quickstart) to get started.
-Additionally, you should have `docker` and `docker-compose` installed on your system.
+### 2. **Set Up GitHub Actions for CI/CD**
-## Getting Started
+* We created a GitHub repository to store the website files.
+* We configured a GitHub Actions workflow that syncs the changes made to the repository with **Netlify** (via the API), so whenever a commit is pushed to the `main` branch, the website is updated automatically.
-To 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.
-Then build the images since they are not published on dockerhub. This is accomplished by adding the `--build` flag as shown below:
+
-```bash
-docker compose up --build
-```
-Having already built the Docker images you can run docker compose without the `--build` flag.
+### 3. **Deployment to Netlify**
-```
-docker compose up
-```
+* We connected the GitHub repository to **Netlify** for hosting the static files.
+* **Netlify** provides automatic HTTPS via SSL certificates, ensuring that the website has a secure connection.
+* After connecting the repository to Netlify, the website was live on a custom subdomain provided by Netlify (`.netlify.app`).
-Your local Medusa setup is now running with each of the services occupying the following ports:
-
-
Medusa Server: 9000
-
Medusa Admin: 7000
-
Storefront: 8000
-
postgres: 5432
-
redis: 6379
-
+
-_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._
-### Seeding your Medusa store
+### 4. **Choosing Netlify Over AWS S3 + Cloudflare**
-To add seed data to your medusa store run this command in a seperate
+* We initially explored using **AWS S3** and **Cloudflare** for hosting the website.
+* However, **Netlify** was chosen as a more streamlined solution due to its built-in features like:
-```
-docker exec medusa-server medusa seed -f ./data/seed.json
-```
+ * Automatic HTTPS (SSL).
+ * Simple deployment via GitHub.
+ * Free tier for personal projects.
+ * Easy custom domain management.
-## Running Medusa with docker in production
+### 5. **Final Website URL**
-This 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.
+* The final static website is deployed on **Netlify** with the URL:
+ [https://pavithra-static-app.netlify.app](https://pavithra-static-app.netlify.app).
-To 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.
+
-```
-docker compose up -f docker-compose.yml -f docker-compose.production.yml up
-```
-`docker-compose.production.yml` contains production relevant overrides to the services described in the `docker-compose.yml` development file.
+### 6. **Live Demo**
-## Try it out
+* You can visit the live demo of the website here:
+ [https://pavithra-static-app.netlify.app](https://pavithra-static-app.netlify.app).
-```
-curl -X GET localhost:9000/store/products | python -m json.tool
-```
+### 7. **Explanation Video**
-After the seed script has run you will have the following things in you database:
+* (https://drive.google.com/file/d/1mrRn3U1aFUM10rU2ypewy0xRhuzzZ20H/view?usp=sharing)
-- a User with the email: admin@medusa-test.com and password: supersecret
-- a Region called Default Region with the countries GB, DE, DK, SE, FR, ES, IT
-- a Shipping Option called Standard Shipping which costs 10 EUR
-- a Product called Cool Test Product with 4 Product Variants that all cost 19.50 EUR
+---
+
+## Key Features
+
+* **Automatic Deployment**: Every change pushed to GitHub triggers an automatic deployment to Netlify via **GitHub Actions**.
+* **Secure Connection (HTTPS)**: The website is served securely over HTTPS with SSL certificates automatically provided by **Netlify**.
+* **Continuous Integration and Continuous Deployment (CI/CD)**: No manual intervention is required. Once a commit is made to GitHub, the website updates automatically.
+
+---
+
+## Deliverables
+
+* **GitHub Actions CI/CD Workflow**: Automates the deployment process.
+* **Cloudflare + S3 Integration Steps**: Although **Cloudflare** and **S3** were initially planned for DNS and hosting, **Netlify** was used instead for easier setup and features.
+* **Live Website Link with HTTPS**: Available at [https://pavithra-static-app.netlify.app](https://pavithra-static-app.netlify.app).
+* **Screenshot & Deployment Report**: Screenshots of the live website and deployment steps are included as part of the documentation.
+
+---
-Visit [docs.medusa-commerce.com](https://docs.medusa-comerce.com) for further guides.
+## Conclusion
-
+In this project, we learned how to automate the deployment of a static website with GitHub Actions, AWS S3, and **Netlify**. Although we initially considered using **Cloudflare** and **S3** for hosting, we switched to **Netlify** due to its ease of use and built-in features such as automatic HTTPS and continuous deployment from GitHub.
From 079d609a3013f09050eede7809ddf8a091edbbb0 Mon Sep 17 00:00:00 2001
From: pavi2001 <74369749+amie2001@users.noreply.github.com>
Date: Wed, 7 May 2025 18:24:28 +0530
Subject: [PATCH 08/11] Create index.html
---
index.html | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 index.html
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..0bb672a
--- /dev/null
+++ b/index.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+ Welcome to My Static Website!
+
+
+
+
+
+
🚀 Welcome to My Static Website!
+
+
+
+
+
+ This site is deployed using Netlify and GitHub ✨
+
+
+ Originally, this project was intended to use AWS S3, GitHub Actions, and Cloudflare for hosting and auto-deployment. However, due to domain limitations and cost constraints, I chose to deploy the site using Netlify, which offers:
+
+
+
Free global CDN (faster content delivery worldwide)
+
Automatic HTTPS/SSL
+
Simple GitHub integration for CI/CD
+
Built-in versioning and cache control
+
Easy setup, no need for separate domain or Cloudflare configuration
+
+
+ This approach made deployment easier, more cost-effective, and beginner-friendly, while still meeting all core objectives of the project.
+