Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omerkarabacak/291a0e84f211d554904d86367e631814 to your computer and use it in GitHub Desktop.
Save omerkarabacak/291a0e84f211d554904d86367e631814 to your computer and use it in GitHub Desktop.
Example config.yml for CircleCI with Bastion Host usage
version: 2.1
executors:
ubuntu_machine:
machine:
image: ubuntu-1604:202004-01
commands:
docker-compose-deploy-to-dev:
description: "Deploy with docker-compose"
steps:
- run: |
ssh -4 -L 9001:<PRIVATE_IP>:22 -Nf delpoyer@<PUBLIC_IP>
ssh -p 9001 [email protected] "docker volume create --name=my_data_volume"
APP_ENV=dev docker-compose -H ssh://[email protected]:9001 -f docker-compose.yml up -d
jobs:
deploy_to_dev:
executor: ubuntu_machine
steps:
- add_ssh_keys:
fingerprints:
- "xx:xx:xx:xx:xx:xx:xx:xx"
- checkout
- docker-compose-deploy-to-dev
workflows:
deploy:
jobs:
- deploy_to_dev:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment