Giter Club home page Giter Club logo

deployerwebservice's Introduction

DeployerWebService

The DeployerWebService is a specialized tool designed to listen to GitHub actions. Once triggered, it deploys applications using docker-compose by pulling the necessary images from GitHub Packages.

Prerequisites

  • Docker
  • Docker Compose
  • .NET SDK (for local development and testing)

Setup

Building the Docker Image

  1. Clone this repository:

    git clone [repository-url]
    cd DeployerWebService
  2. Build the Docker image:

    docker build -t deployer-web-service .

Running with Docker Compose

You can run the DeployerWebService alongside a PostgreSQL container using docker-compose.

  1. Start the services:
    docker-compose up --build

This will start the deployer and a PostgreSQL container. The deployer will be available on port 3580 of your host machine.

Configuration

  • Ensure the PostgreSQL connection string in your deployer application uses the postgres service name as the host (as defined in the docker-compose.yml).
  • Secure your PostgreSQL instance. Use strong credentials and follow best practices for securing databases.

Usage

  1. Triggering Deployment:

    • Send a POST request to /deploy/{appId} to trigger the deployment for a particular app. Replace {appId} with the ID of the application you want to deploy.
  2. Webhooks:

    • The service validates GitHub webhook signatures for security. Ensure you configure your GitHub repository to send webhooks to this service and set the secret key in the deployer's configuration.

Important Notes

  • Running docker-compose commands from within a container requires certain considerations. We mount the Docker socket from the host into the deployer container, which allows it to run Docker commands as if they were being run on the host itself. Ensure you understand the security implications of this setup.

  • Always back up important data from your PostgreSQL database.

Support

For issues, feature requests, or assistance, please open an issue in the repository or contact the maintainers.

deployerwebservice's People

Contributors

ntezi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.