From 5a556ab8307f91983f25d1ae544d4bcc380add25 Mon Sep 17 00:00:00 2001 From: Mayank Date: Mon, 6 Jul 2020 00:46:09 +0530 Subject: [PATCH] Use named volumes for JWT keys --- db/{jwt-private-key => }/.gitkeep | 0 db/jwt-public-key/.gitkeep | 0 docker-compose.yml | 12 +++++++++--- 3 files changed, 9 insertions(+), 3 deletions(-) rename db/{jwt-private-key => }/.gitkeep (100%) delete mode 100644 db/jwt-public-key/.gitkeep diff --git a/db/jwt-private-key/.gitkeep b/db/.gitkeep similarity index 100% rename from db/jwt-private-key/.gitkeep rename to db/.gitkeep diff --git a/db/jwt-public-key/.gitkeep b/db/jwt-public-key/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docker-compose.yml b/docker-compose.yml index c45fee3..f54e5fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -87,11 +87,13 @@ services: - /var/run/docker.sock:/var/run/docker.sock - /usr/bin/docker:/usr/bin/docker - ${PWD}:${PWD} + - jwt-public-key:/jwt-public-key + - jwt-private-key:/jwt-private-key environment: PORT: "3006" USER_PASSWORD_FILE: "/db/user.json" - JWT_PUBLIC_KEY_FILE: "/db/jwt-public-key/jwt.pem" - JWT_PRIVATE_KEY_FILE: "/db/jwt-private-key/jwt.key" + JWT_PUBLIC_KEY_FILE: "/jwt-public-key/jwt.pem" + JWT_PRIVATE_KEY_FILE: "/jwt-private-key/jwt.key" JWT_EXPIRATION: "3600" DOCKER_COMPOSE_DIRECTORY: $PWD DEVICE_HOST: "http://umbrel.local" @@ -109,7 +111,7 @@ services: depends_on: [ manager ] volumes: - ${PWD}/lnd:/lnd - - ${PWD}/db/jwt-public-key:/jwt-public-key + - jwt-public-key:/jwt-public-key environment: PORT: "3005" BITCOIN_HOST: "10.11.1.1" @@ -129,3 +131,7 @@ networks: driver: default config: - subnet: 10.11.0.0/16 + +volumes: + jwt-public-key: + jwt-private-key: \ No newline at end of file