This commit is contained in:
parent
f542a59f82
commit
6cd507fb3e
1 changed files with 22 additions and 18 deletions
34
.drone.yml
34
.drone.yml
|
@ -1,25 +1,29 @@
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: deploy-to-dokku
|
name: deploy
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: dokku/ci-docker-image
|
image: dokku/ci-docker-image
|
||||||
settings:
|
pull: always
|
||||||
dokku_host: apps1.fnukinternal.net # replace with your Dokku host
|
environment:
|
||||||
dokku_app: dokku-ci-deploy # replace with your Dokku app name
|
DOKKU_HOST: apps1.fnukinternal.net
|
||||||
dokku_key:
|
DOKKU_APP_NAME: dokku-ci-deploy
|
||||||
|
DOKKU_USERNAME: dokku
|
||||||
|
SSH_PRIVATE_KEY:
|
||||||
from_secret: dokku_ssh_key
|
from_secret: dokku_ssh_key
|
||||||
dokku_git_remote: dokku@apps1.fnukinternal.net:dokku-ci-deploy
|
JUMP_HOST: 192.168.0.24
|
||||||
dokku_jump_host: 192.168.0.24 # replace with your jump host
|
JUMP_USER: jumpuser
|
||||||
dokku_jump_user: jumpuser # replace with the user to use on the jump host
|
JUMP_PRIVATE_KEY:
|
||||||
dokku_jump_key:
|
|
||||||
from_secret: dokku_ssh_key
|
from_secret: dokku_ssh_key
|
||||||
dokku_force_push: "true"
|
commands:
|
||||||
dokku_confirm: "true"
|
- mkdir -p ~/.ssh
|
||||||
dokku_sync_networks: "true"
|
- echo "$JUMP_PRIVATE_KEY" > ~/.ssh/id_rsa_jump
|
||||||
dokku_build_dir: "."
|
- chmod 600 ~/.ssh/id_rsa_jump
|
||||||
dokku_deploy_branch: main # replace with the branch you want to deploy
|
- echo "Host dokku.example.com" > ~/.ssh/config
|
||||||
|
- echo " ProxyCommand ssh -W %h:%p $JUMP_USER@$JUMP_HOST -i ~/.ssh/id_rsa_jump" >> ~/.ssh/config
|
||||||
|
- dokku apps:create $DOKKU_APP_NAME
|
||||||
|
- dokku git:sync --force $DOKKU_APP_NAME
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
|
|
Loading…
Reference in a new issue