0.0.6 • Published 6 months ago

ddroid v0.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

DDroid

'DDroid' is a command-line tool designed to simplify the management and deployment of Docker, Kubernetes, and local development environments for your projects. It reads configurations from a YAML file (ddroid.yml or ddroid.yaml) to define different environments and their settings.

Installation

npm install -g ddroid

Usage

After installing ddroid, you can use it by running the following command in your project directory:

ddroid

This command will interactively guide you through different options to run your project in various environments.

Configuration

DDroid relies on a YAML configuration file (ddroid.yml or ddroid.yaml) to define your project's environments. Below is a basic example of a ddroid.yml file:

environments:
  locally:
    from-docker: # required docker service
      docker_service:
        context: ./path/to/docker
        file: docker-compose.dev.yml
        service: docker_service
    entrypoints: # optional
      entrypoint1:
        ask_first: true # accept 'true' or 'false' (default='false')
        default: no # accept 'yes' or 'no' (default=no)
        cmd: [echo "Running entrypoint1"]
        require: # optional
          search: node_modules
          role: exist # accept 'exist' or 'npt-exist' (default:'npt-exist')
    temp-files: # optional
      - /path/to/temp/file1

  docker: 
    production:
      context: ./path/to/docker
      dockerfile: Dockerfile
    development:
      context: ./path/to/docker
      dockerfile: Dockerfile.dev
      entrypoints: 
        entrypoint1:
          pod_name: docker_container_name
          ask_first: true # accept 'true' or 'false' (default='false')
          default: no # accept 'yes' or 'no' (default=no)
          cmd: [echo "Running entrypoint1"]
          require: # optional
            search: node_modules
            role: exist # accept 'exist' or 'npt-exist' (default:'npt-exist')
    build:
      context: ./docker
      dockerfile: Dockerfile
      docker_user: igorlage
      image_name: image_teste
      version: 0.1
      push: false

  k8s:
    context: ../path/to/k8s

    deploy:
      pod-name:
        entrypoints:
          entrypoint1:
            ask_first: true # accept 'true' or 'false' (default='false')
            default: no # accept 'yes' or 'no' (default=no)
            cmd: [echo "Running entrypoint1"]
            require: # optional
              search: node_modules
              role: exist # accept 'exist' or 'npt-exist' (default:'npt-exist')

    port-foward:
      service-name:
        port-foward: 3001

In this example, you have three main environments: locally, docker, and k8s. Each environment has its specific configurations, such as Docker settings, Kubernetes deployment details, and local development options.

Feel free to adapt the configuration to match the structure and needs of your project. The provided example demonstrates some common settings, including entrypoints for running specific commands in each environment.

License

This project is licensed under the MIT License - see the LICENSE file for details.

0.0.6

6 months ago

0.0.5

6 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago