fixed docker environment variables

This commit is contained in:
Felix Lohmeier 2017-02-02 11:05:14 +01:00
parent b83245cba9
commit 67b586a734
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ There are some client libraries for OpenRefine that communicate with the [OpenRe
2) start server
```docker run --d --name=openrefine-server -v ${workingdir}:/data:z felixlohmeier/openrefine -i 0.0.0.0 -m 4G -d /data```
```docker run -d --name=openrefine-server -v ${workingdir}:/data:z felixlohmeier/openrefine -i 0.0.0.0 -m 4G -d /data```
3) create project (import file)

View File

@ -513,11 +513,11 @@ def main():
"""Main."""
# get environment variables in docker network
docker_host = os.environ.get('OPENREFINE_PORT_3333_TCP_ADDR')
docker_host = os.environ.get('OPENREFINE_SERVER_PORT_3333_TCP_ADDR')
if docker_host:
os.environ["OPENREFINE_HOST"] = docker_host
refine.REFINE_HOST = docker_host
docker_port = os.environ.get('OPENREFINE_PORT_3333_TCP_PORT')
docker_port = os.environ.get('OPENREFINE_SERVER_PORT_3333_TCP_PORT')
if docker_port:
os.environ["OPENREFINE_HOST"] = docker_port
refine.REFINE_PORT = docker_port