diff --git a/docker-compose.yml b/docker-compose.yml index 50d6222..b0db7ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,8 @@ services: - ./.env ports: - 5000 + volumes: + - ./.security:/ref-test/.security restart: unless-stopped networks: - frontend diff --git a/ref-test/common/security/__init__.py b/ref-test/common/security/__init__.py index e553347..e6a8b3c 100644 --- a/ref-test/common/security/__init__.py +++ b/ref-test/common/security/__init__.py @@ -2,17 +2,17 @@ from os import environ, path from cryptography.fernet import Fernet def generate_keyfile(): - with open('./common/security/.encryption.key', 'wb') as keyfile: + with open('.security/.encryption.key', 'wb') as keyfile: key = Fernet.generate_key() keyfile.write(key) def load_key(): - with open('./common/security/.encryption.key', 'rb') as keyfile: + with open('.security/.encryption.key', 'rb') as keyfile: key = keyfile.read() return key def check_keyfile_exists(): - return path.isfile('./common/security/.encryption.key') + return path.isfile('.security/.encryption.key') def encrypt(input): if not check_keyfile_exists():