From d51016d72dd707a6b81760f1226eea133f7a196e Mon Sep 17 00:00:00 2001 From: Kevin Baensch Date: Fri, 18 Nov 2022 12:01:40 +0100 Subject: [PATCH] Move SQL Proxy into separate compose file. --- docker-compose-sqlproxy.yml | 25 +++++++++++++++++++++++++ docker-compose.yml | 22 ---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 docker-compose-sqlproxy.yml diff --git a/docker-compose-sqlproxy.yml b/docker-compose-sqlproxy.yml new file mode 100644 index 0000000..04c2437 --- /dev/null +++ b/docker-compose-sqlproxy.yml @@ -0,0 +1,25 @@ +version: "3.4" + +services: + sshd: + build: + context: . + dockerfile: ./Dockerfile + command: ["./sqlproxy.sh", "&", "wait", "$!" ] + ports: + - 22:22 + volumes: + - ./etc/ssh:/etc/ssh/ + - /var/run/docker.sock:/tmp/docker.sock:ro + - ./script/hostman.sh:/hostman.sh:ro + - ./script/sqlproxy.sh:/sqlproxy.sh:ro + - ./script/sqlproxy_cli.sh:/sqlproxy_cli.sh:ro + environment: + DISABLE_KEYGEN: true + DISABLE_CONFIG_GEN: true + HOST_CONF_PATH: /etc/hosts + RESOLVE_DOCKERHOST: true + DOCKER_HOSTNAME_VAR: DB_VHOST + networks: + - proxy + restart: unless-stopped diff --git a/docker-compose.yml b/docker-compose.yml index 7ef3b3f..b99048e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,28 +8,6 @@ services: - /var/run/docker.sock:/tmp/docker.sock:ro - /etc/hosts:/tmp/hosts:rw - ./script/hostman.sh:/hostman.sh:ro - sshd: - build: - context: . - dockerfile: ./Dockerfile - command: ["./sqlproxy.sh", "&", "wait", "$!" ] - ports: - - 22:22 - volumes: - - ./etc/ssh:/etc/ssh/ - - /var/run/docker.sock:/tmp/docker.sock:ro - - ./script/hostman.sh:/hostman.sh:ro - - ./script/sqlproxy.sh:/sqlproxy.sh:ro - - ./script/sqlproxy_cli.sh:/sqlproxy_cli.sh:ro - environment: - DISABLE_KEYGEN: true - DISABLE_CONFIG_GEN: true - HOST_CONF_PATH: /etc/hosts - RESOLVE_DOCKERHOST: true - DOCKER_HOSTNAME_VAR: DB_VHOST - networks: - - proxy - restart: unless-stopped nginx-proxy: image: jwilder/nginx-proxy ports: