diff --git a/development.mysql.yml b/development.mysql.yml index ce6641475b..d89a29b7ae 100644 --- a/development.mysql.yml +++ b/development.mysql.yml @@ -1,32 +1,67 @@ -server: - build: . - dockerfile: server.Dockerfile - links: - - mysql - - signer - - signer:notarysigner - entrypoint: /usr/bin/env sh - command: -c "./migrations/migrate.sh && notary-server -config=fixtures/server-config.json" -signer: - build: . - dockerfile: signer.Dockerfile - links: - - mysql - entrypoint: /usr/bin/env sh - command: -c "./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json" -mysql: - volumes: - - ./notarymysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d - image: mariadb:10.1.10 - environment: - - TERM=dumb - - MYSQL_ALLOW_EMPTY_PASSWORD="true" - command: mysqld --innodb_file_per_table -client: - volumes: - - ./test_output:/test_output - build: . - dockerfile: Dockerfile - links: - - server:notary-server - command: buildscripts/testclient.sh +version: "2" +services: + server: + build: + context: . + dockerfile: server.Dockerfile + networks: + rdb: + sig: + srv: + aliases: + - notary-server + environment: + - GODEBUG=netdns=cgo + entrypoint: /usr/bin/env sh + command: -c "./migrations/migrate.sh && notary-server -config=fixtures/server-config.json" + depends_on: + - mysql + - signer + signer: + build: + context: . + dockerfile: signer.Dockerfile + networks: + rdb: + sig: + aliases: + - notarysigner + environment: + - GODEBUG=netdns=cgo + entrypoint: /usr/bin/env sh + command: -c "./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json" + depends_on: + - mysql + mysql: + networks: + - rdb + volumes: + - ./notarymysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + image: mariadb:10.1.10 + environment: + - TERM=dumb + - MYSQL_ALLOW_EMPTY_PASSWORD="true" + command: mysqld --innodb_file_per_table + client: + build: + context: . + dockerfile: Dockerfile + environment: + - GODEBUG=netdns=cgo + command: buildscripts/testclient.sh + volumes: + - ./test_output:/test_output + networks: + - srv + depends_on: + - server +volumes: + notary_data: + external: false +networks: + rdb: + external: false + sig: + external: false + srv: + external: false diff --git a/docker-compose.yml b/docker-compose.yml index cc4923b8bc..19244c0b63 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +1,49 @@ -server: - build: . - dockerfile: server.Dockerfile - links: - - mysql - - signer - - signer:notarysigner - ports: - - "8080" - - "4443:4443" - entrypoint: /usr/bin/env sh - command: -c "./migrations/migrate.sh && notary-server -config=fixtures/server-config.json" -signer: - build: . - dockerfile: signer.Dockerfile - links: - - mysql - entrypoint: /usr/bin/env sh - command: -c "./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json" -mysql: - volumes: - - ./notarymysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d - - notary_data:/var/lib/mysql - image: mariadb:10.1.10 - environment: - - TERM=dumb - - MYSQL_ALLOW_EMPTY_PASSWORD="true" - command: mysqld --innodb_file_per_table +version: "2" +services: + server: + build: + context: . + dockerfile: server.Dockerfile + networks: + - rdb + - sig + ports: + - "8080" + - "4443:4443" + entrypoint: /usr/bin/env sh + command: -c "./migrations/migrate.sh && notary-server -config=fixtures/server-config.json" + depends_on: + - mysql + - signer + signer: + build: + context: . + dockerfile: signer.Dockerfile + networks: + rdb: + sig: + aliases: + - notarysigner + entrypoint: /usr/bin/env sh + command: -c "./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json" + depends_on: + - mysql + mysql: + networks: + - rdb + volumes: + - ./notarymysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + - notary_data:/var/lib/mysql + image: mariadb:10.1.10 + environment: + - TERM=dumb + - MYSQL_ALLOW_EMPTY_PASSWORD="true" + command: mysqld --innodb_file_per_table +volumes: + notary_data: + external: false +networks: + rdb: + external: false + sig: + external: false