From 23795ae50944fc8fe98517fb5d912f47b83aca74 Mon Sep 17 00:00:00 2001 From: Jeroen Boersma Date: Fri, 27 Jul 2018 15:49:38 +0200 Subject: [PATCH] No SSH agent running? No error * no longer throw an error if no ssh agent is running --- bin/dev | 9 ++++- build/dist/docker-compose-ssh.yml | 67 ------------------------------- docker-compose.yml | 16 -------- 3 files changed, 8 insertions(+), 84 deletions(-) diff --git a/bin/dev b/bin/dev index 6f96ecd..5431fbe 100755 --- a/bin/dev +++ b/bin/dev @@ -24,7 +24,8 @@ init() { dc yml 'docker-compose.yml'; dc yml_if 'build/dist/docker-compose-blackfire.yml' 'conf/blackfire'; dc yml_if 'docker-custom.yml' 'docker-custom.yml'; - dc yml_os + dc yml_os; + dc yml_ssh; dc mode 'run --rm'; @@ -124,6 +125,12 @@ dc() { fi } + yml_ssh() { + if [ -n "${SSH_AUTH_SOCK}" ]; then + yml build/dist/docker-compose-ssh.yml; + fi + } + mode() { DEV_MODE=$*; } diff --git a/build/dist/docker-compose-ssh.yml b/build/dist/docker-compose-ssh.yml index 62494d5..5bf0853 100644 --- a/build/dist/docker-compose-ssh.yml +++ b/build/dist/docker-compose-ssh.yml @@ -1,91 +1,24 @@ version: '2' -networks: {} -volumes: - dockerdev-mysql-volume: - external: true services: - db: - image: percona - volumes: - - ./conf.d/mysql:/etc/mysql/conf.d:ro - - dockerdev-mysql-volume:/var/lib/mysql:rw - env_file: - - ./conf/mysql - network_mode: bridge - ports: - - 127.0.0.1:3306:3306 - - mailcatch: - image: mailhog/mailhog - network_mode: bridge - php70: - build: - context: build/dist/php70 - links: - - db - - mailcatch - - redis environment: SSH_AUTH_SOCK: "/ssh-socket" volumes: - ${SSH_AUTH_SOCK}:/ssh-socket:ro - network_mode: bridge php56: - build: - context: build/dist/php56 - links: - - db - - mailcatch - - redis environment: SSH_AUTH_SOCK: "/ssh-socket" volumes: - ${SSH_AUTH_SOCK}:/ssh-socket:ro - network_mode: bridge php71: - build: - context: build/dist/php71 - links: - - db - - mailcatch - - redis environment: SSH_AUTH_SOCK: "/ssh-socket" volumes: - ${SSH_AUTH_SOCK}:/ssh-socket:ro - network_mode: bridge php72: - build: - context: build/dist/php72 - links: - - db - - mailcatch - - redis environment: SSH_AUTH_SOCK: "/ssh-socket" volumes: - ${SSH_AUTH_SOCK}:/ssh-socket:ro - network_mode: bridge - redis: - image: redis:alpine - network_mode: bridge - - web: - build: - context: build/dist/web - environment: - DOMAINSUFFIX: '.localhost' - links: - - mailcatch - - php70:fpm - - php70:fpm70 - - php56:fpm56 - - php71:fpm71 - - php72:fpm72 - network_mode: bridge - ports: - - 127.0.0.1:443:443 - - 127.0.0.1:80:80 diff --git a/docker-compose.yml b/docker-compose.yml index 62494d5..2684791 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,10 +27,6 @@ services: - db - mailcatch - redis - environment: - SSH_AUTH_SOCK: "/ssh-socket" - volumes: - - ${SSH_AUTH_SOCK}:/ssh-socket:ro network_mode: bridge php56: build: @@ -39,10 +35,6 @@ services: - db - mailcatch - redis - environment: - SSH_AUTH_SOCK: "/ssh-socket" - volumes: - - ${SSH_AUTH_SOCK}:/ssh-socket:ro network_mode: bridge php71: build: @@ -51,10 +43,6 @@ services: - db - mailcatch - redis - environment: - SSH_AUTH_SOCK: "/ssh-socket" - volumes: - - ${SSH_AUTH_SOCK}:/ssh-socket:ro network_mode: bridge php72: build: @@ -63,10 +51,6 @@ services: - db - mailcatch - redis - environment: - SSH_AUTH_SOCK: "/ssh-socket" - volumes: - - ${SSH_AUTH_SOCK}:/ssh-socket:ro network_mode: bridge redis: