Skip to content

V1 of DeployerDock, this was a fun project, learned a lot from this. Here we take the repository's git link from the user and the base path, then we asynchronously, using sqs, clone the repo and build it on the server. Then we push the clone files to the s3 bucket and then the request handler module serves the build files to the user.

Notifications You must be signed in to change notification settings

pushpitjain2006/DeployerDock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeployerDock V1: Git Website Builder and Deployer

This project automates the deployment process for websites hosted on Git. It takes a Git repository URL as input, deploys the website, and provides the deployed website's ID and URL in the format https://id.localhost:3001.

videoframe_2310 [https://youtu.be/BVpSEqu5ej4/]

Prerequisites

  • Node.js and npm (or yarn) installed on your system.
  • AWS account with SQS and S3 services enabled.

Installation

  1. Clone this repository:

    git clone https://github.com/pushpitjain2006/DeployerDock.git
  2. Navigate to the project directory:

    cd DeployerDock

Running the Project

The project consists of four separate services: deploy-service, upload-service, request-handler, and frontend. You need to start them in a specific order for the deployment process to function correctly.

Before starting each service add your credentials in the .env file as per the requirements.

  1. Start the Deploy Service:

    cd deploy-service
    cp .env.example .env

    Complete the fields in .env file

    npm install
    npm run build
    node dist/index.cjs

    This service handles the core deployment logic.

  2. Start the Upload Service:

    cd upload-service
    cp .env.example .env

    Complete the fields in .env file

    npm install
    npm run build
    node dist/app.cjs

    This service is responsible for handling frontend requests and uploading URL to the deployment queue (AWS SQS).

  3. Start the Request Handler:

    cd request-handler
    cp .env.example .env

    Complete the fields in .env file

    npm install
    npm run build
    node dist/index.cjs

    This service handles incoming requests for website deployment and interacts with other services.

  4. Start the Frontend: (Optional, if you have a user interface)

    cd frontend
    cp .env.example .env

    Complete the fields in .env file

    npm install
    npm run dev

    This service provides a user interface for interacting with the deployment process (if implemented). (You can alternatively build the frontend and serve it using a static file server.)

Usage

Once all services are running, navigate to the frontend at http://localhost:5173/. Here, you can deploy a website by providing its Git repository URL and the base path for the frontend in your repository. Currently, the project supports only frontend projects that use npm run build for building (e.g., React, Angular, Vue, etc.).

Deployment Output

videoframe_101036 Upon successful deployment, the project will return the following information:

  • Deployed Website ID: A unique identifier assigned to the deployed website by the hosting platform.
  • Deployed Website URL: The URL of the deployed website. Example: https://id.localhost:3001.

About

V1 of DeployerDock, this was a fun project, learned a lot from this. Here we take the repository's git link from the user and the base path, then we asynchronously, using sqs, clone the repo and build it on the server. Then we push the clone files to the s3 bucket and then the request handler module serves the build files to the user.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published