Add Makefile and docker-compose v3

This commit is contained in:
Christophe Mehay 2017-08-21 09:29:49 +02:00
parent f206ea354c
commit 3ee624d910
6 changed files with 102 additions and 1 deletions

View file

@ -6,12 +6,12 @@ group: tor
secret_env:
- '*_KEY'
- '*_PORTS'
- '*_SERVICE_NAME'
pre_conf_commands:
- onions --setup-hosts
post_conf_commands:
- onions
- chown -R tor:tor $HOME
reload:

View file

@ -118,6 +118,8 @@ class ServicesGroup(object):
def load_key_from_secrets(self):
'Load key from docker secret using service name'
secret_file = os.path.join('/run/secrets', self.name)
if not os.path.exists(secret_file):
return
try:
self._load_key(secret_file)
self._key_in_secrets = True