https://github.com/drixs6o9/docker-deployer
Docker image to use Deployer without PHP on your host or on Github Actions.
https://github.com/drixs6o9/docker-deployer
deployment docker docker-image php
Last synced: 2 months ago
JSON representation
Docker image to use Deployer without PHP on your host or on Github Actions.
- Host: GitHub
- URL: https://github.com/drixs6o9/docker-deployer
- Owner: drixs6o9
- Created: 2020-08-31T13:00:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T12:32:11.000Z (about 3 years ago)
- Last Synced: 2025-03-20T00:17:57.906Z (over 1 year ago)
- Topics: deployment, docker, docker-image, php
- Language: Shell
- Homepage: https://deployer.org/
- Size: 124 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker deployer
Docker image to use Deployer (Deployment tool for PHP) without the need to have PHP on your host.
See [Deployer.org](https://deployer.org/)
On GitHub : [deployphp/deployer](https://github.com/deployphp/deployer)
## How to use
[See on Docker Hub](https://hub.docker.com/r/drixs6o9/docker-deployer/)
``` bash
# 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)
``` bash
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.
```yaml
- 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](https://github.com/omouren/docker-deployer)