Skip to content
Snippets Groups Projects
Commit 2ead38bb authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Add new config option. DOCKER_NETWORK_NAME

parent 399d41dd
No related branches found
No related tags found
No related merge requests found
...@@ -143,7 +143,7 @@ def _create_cqpserver_container(corpus): ...@@ -143,7 +143,7 @@ def _create_cqpserver_container(corpus):
''' ## Name ## ''' ''' ## Name ## '''
name = f'cqpserver_{corpus.id}' name = f'cqpserver_{corpus.id}'
''' ## Network ## ''' ''' ## Network ## '''
network = 'nopaque_default' network = f'{current_app.config["DOCKER_NETWORK_NAME"]}'
''' ## Volumes ## ''' ''' ## Volumes ## '''
volumes = [] volumes = []
''' ### Corpus data volume ### ''' ''' ### Corpus data volume ### '''
......
...@@ -11,6 +11,9 @@ load_dotenv(os.path.join(basedir, '.env')) ...@@ -11,6 +11,9 @@ load_dotenv(os.path.join(basedir, '.env'))
class Config: class Config:
''' Docker '''
DOCKER_NETWORK_NAME = os.environ.get('DOCKER_NETWORK_NAME', 'nopaque_default')
''' APIFairy ''' ''' APIFairy '''
APIFAIRY_TITLE = 'nopaque' APIFAIRY_TITLE = 'nopaque'
APIFAIRY_VERSION = '0.0.1' APIFAIRY_VERSION = '0.0.1'
......
version: "3.5" version: "3.5"
networks:
default:
name: "${DOCKER_NETWORK_NAME:-nopaque_default}"
services: services:
db: db:
env_file: db.env env_file: db.env
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment