From d6ca864d51573c77f81ffbe8acd140f2f85d398d Mon Sep 17 00:00:00 2001 From: Andrey Zhavoronkov <41117609+azhavoro@users.noreply.github.com> Date: Tue, 11 Aug 2020 05:37:27 +0300 Subject: [PATCH] Added instructions how to deploy CVAT behind a proxy (#2009) * added deploy behind a proxy instructions * fix * updated toc * fixed typo --- .../analytics/docker-compose.analytics.yml | 2 +- cvat/apps/documentation/installation.md | 23 +++++++++++++++++++ docker-compose.yml | 12 +++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/components/analytics/docker-compose.analytics.yml b/components/analytics/docker-compose.analytics.yml index eef11921..5edcd505 100644 --- a/components/analytics/docker-compose.analytics.yml +++ b/components/analytics/docker-compose.analytics.yml @@ -63,7 +63,7 @@ services: DJANGO_LOG_SERVER_PORT: 5000 DJANGO_LOG_VIEWER_HOST: kibana DJANGO_LOG_VIEWER_PORT: 5601 - no_proxy: kibana,logstash,${no_proxy} + no_proxy: kibana,logstash,nuclio,${no_proxy} volumes: cvat_events: diff --git a/cvat/apps/documentation/installation.md b/cvat/apps/documentation/installation.md index 9bff3930..1741a16b 100644 --- a/cvat/apps/documentation/installation.md +++ b/cvat/apps/documentation/installation.md @@ -3,6 +3,7 @@ - [Windows 10](#windows-10) - [Mac OS Mojave](#mac-os-mojave) - [Advanced topics](#advanced-topics) + - [Deploying CVAT behind a proxy](#deploying-cvat-behind-a-proxy) - [Additional components](#additional-components) - [Semi-automatic and automatic annotation](#semi-automatic-and-automatic-annotation) - [Stop all containers](#stop-all-containers) @@ -245,6 +246,28 @@ server. Proxy is an advanced topic and it is not covered by the guide. ## Advanced topics +### Deploying CVAT behind a proxy +If you deploy CVAT behind a proxy and do not plan to use any of [serverless functions](#semi-automatic-and-automatic-annotation) +for automatic annotation, the exported environment variables +`http_proxy`, `https_proxy` and `no_proxy` should be enough to build images. +Otherwise please create or edit the file `~/.docker/config.json` in the home directory of the user +which starts containers and add JSON such as the following: +```json +{ + "proxies": + { + "default": + { + "httpProxy": "http://proxy_server:port", + "httpsProxy": "http://proxy_server:port", + "noProxy": "*.test.example.com,.example2.com" + } + } +} +``` +These environment variables are set automatically within any container. +Please see the [Docker documentation](https://docs.docker.com/network/proxy/) for more details. + ### Additional components - [Analytics: management and monitoring of data annotation team](/components/analytics/README.md) diff --git a/docker-compose.yml b/docker-compose.yml index 60a5965b..6745493f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,7 +42,7 @@ services: args: http_proxy: https_proxy: - no_proxy: + no_proxy: nuclio,${no_proxy} socks_proxy: USER: "django" DJANGO_CONFIGURATION: "production" @@ -107,10 +107,20 @@ services: - /tmp:/tmp - /var/run/docker.sock:/var/run/docker.sock environment: + http_proxy: + https_proxy: + no_proxy: 172.28.0.1,${no_proxy} NUCLIO_CHECK_FUNCTION_CONTAINERS_HEALTHINESS: "true" ports: - "8070:8070" +networks: + default: + ipam: + config: + - subnet: 172.28.0.0/24 + gateway: 172.28.0.1 + volumes: cvat_db: cvat_data: