Skip to content

Docker image to use Deployer without PHP on your host or on Github Actions.

Notifications You must be signed in to change notification settings

drixs6o9/docker-deployer

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Docker deployer

Docker image to use Deployer (Deployment tool for PHP) without the need to have PHP on your host.

See Deployer.org

On GitHub : deployphp/deployer

How to use

See on Docker Hub

# To run "dep"
$ docker run --rm -ti -v ${PWD}:/app drixs6o9/docker-deployer:latest
# To run "dep init"
$ docker run --rm -ti -v ${PWD}:/app drixs6o9/docker-deployer:latest init
# To run "dep deploy" with SSH Agent Forwarding
$ docker run --rm -ti -v ${PWD}:/app -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK drixs6o9/docker-deployer:latest deploy

Alias

Now just add an alias to use it more simply (in your ~/.bash_aliases for example)

alias dep="docker run --rm -ti -v ${PWD}:/app drixs6o9/docker-deployer:latest"
# Or
alias dep="docker run --rm -ti -v ${PWD}:/app -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK drixs6o9/docker-deployer:latest"

Github Actions

You can use this docker image in docker actions.

- name: Deploy to prod server
  uses: drixs6o9/docker-deployer@master
  with:
    args: deploy prod
   env:
    SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}

/!\ Be aware in your deployer configuration you have to disable multiplexing.

Build arguments

Argument Default value
DEPLOYER_VERSION 7.3.0

Credits

Based on omouren's idea