Giter Club home page Giter Club logo

docker-remote-deployment-action's Introduction

Docker Remote Deployment Action

A GitHub Action that supports docker-compose and Docker Swarm deployments on a remote host using SSH.

The Action is adapted from work by sulthonzh

Example

Below is a brief example on how the action can be used:

- name: Deploy to Docker compose
  uses: loph3xertoi/docker-remote-deployment-action@v1
  with:
    remote_docker_host: user@host
    ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
    ssh_public_key: ${{ secrets.SSH_PUBLIC_KEY }}
    deployment_mode: docker-compose
    copy_stack_file: true
    deploy_path: /root/my-deployment
    stack_file_name: docker-compose.yaml
    keep_files: 5
    args: -p my_app up -d

Input Configurations

remote_docker_host

Remote Docker host ie (user@host).

remote_docker_port

Remote Docker ssh port ie (22).

ssh_public_key

Remote Docker SSH public key eg (~/.ssh/rsa_id.pub).

ssh_private_key

SSH private key used to connect to the docker host eg (~/.ssh/rsa_id).

args

Deployment command args.

deployment_mode

Deployment mode either docker-swarm or docker-compose. Default is docker-compose.

copy_stack_file

Copy stack file to remote server and deploy from the server. Default is false.

deploy_path

The path where the stack files will be copied to. Default ~/docker-deployment.

stack_file_name

Docker stack file used. Default is docker-compose.yml.

keep_files

Number of the files to be kept on the server. Default is 3.

docker_prune

A boolean input to trigger docker image prune command. Default is false.

pre_deployment_command_args

The args for the pre deploument command.

pull_images_first

Pull docker images before deploying. Default is false.

docker_registry_username

The docker registry username.

docker_registry_password

The docker registry password.

docker_registry_uri

The docker registry URI. Default is https://registry.hub.docker.com.

docker_compose_down

Run docker compose down before up. Default is false.

docker-remote-deployment-action's People

Contributors

sulthonzh avatar loph3xertoi avatar renovate-bot avatar renovate[bot] 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.