From 56e8d864ce3ca94cd8fe80484835cf7bd9dda0a6 Mon Sep 17 00:00:00 2001 From: Ying Li Date: Tue, 24 Nov 2015 17:57:43 -0500 Subject: [PATCH] Add some standalone (does not require MySQL) configuration files for server and signer, and set these to be the default configuration files when running the images. Compose specifies the configuration with MySQL. Signed-off-by: Ying Li --- Dockerfile.server | 2 +- Dockerfile.signer | 2 +- docker-compose.yml | 4 +++- fixtures/server-config-local.json | 22 ++++++++++++++++++++++ fixtures/signer-config-local.json | 15 +++++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 fixtures/server-config-local.json create mode 100644 fixtures/signer-config-local.json diff --git a/Dockerfile.server b/Dockerfile.server index eac83a4067..a2273bc523 100644 --- a/Dockerfile.server +++ b/Dockerfile.server @@ -20,4 +20,4 @@ RUN go install \ ${NOTARYPKG}/cmd/notary-server ENTRYPOINT [ "notary-server" ] -CMD [ "-config", "fixtures/server-config.json" ] +CMD [ "-config=fixtures/server-config-local.json" ] diff --git a/Dockerfile.signer b/Dockerfile.signer index de85aa9fdb..81ce64729e 100644 --- a/Dockerfile.signer +++ b/Dockerfile.signer @@ -38,4 +38,4 @@ RUN go install \ ENTRYPOINT [ "notary-signer" ] -CMD [ "-config=fixtures/signer-config.json" ] +CMD [ "-config=fixtures/signer-config-local.json" ] diff --git a/docker-compose.yml b/docker-compose.yml index 00e9471285..e774a3a925 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,8 @@ notaryserver: - "8080" - "4443:4443" environment: - SERVICE_NAME: notary + - SERVICE_NAME=notary + command: -config=fixtures/server-config.json notarysigner: volumes: - /dev/bus/usb/003/010:/dev/bus/usb/002/010 @@ -17,6 +18,7 @@ notarysigner: dockerfile: Dockerfile.signer links: - notarymysql + command: -config=fixtures/signer-config.json notarymysql: build: ./notarymysql/ ports: diff --git a/fixtures/server-config-local.json b/fixtures/server-config-local.json new file mode 100644 index 0000000000..410d1cc8bb --- /dev/null +++ b/fixtures/server-config-local.json @@ -0,0 +1,22 @@ +{ + "server": { + "http_addr": ":4443", + "tls_key_file": "./notary-server.key", + "tls_cert_file": "./notary-server.crt" + }, + "trust_service": { + "type": "remote", + "hostname": "notarysigner", + "port": "7899", + "tls_ca_file": "./root-ca.crt", + "key_algorithm": "ecdsa", + "tls_client_cert": "./notary-server.crt", + "tls_client_key": "./notary-server.key" + }, + "logging": { + "level": "debug" + }, + "storage": { + "backend": "memory" + } +} diff --git a/fixtures/signer-config-local.json b/fixtures/signer-config-local.json new file mode 100644 index 0000000000..e5da0101e7 --- /dev/null +++ b/fixtures/signer-config-local.json @@ -0,0 +1,15 @@ +{ + "server": { + "http_addr": ":4444", + "grpc_addr": ":7899", + "tls_cert_file": "./notary-signer.crt", + "tls_key_file": "./notary-signer.key", + "client_ca_file": "./notary-server.crt" + }, + "logging": { + "level": "debug" + }, + "storage": { + "backend": "memory" + } +}