diff --git a/compose/codetogether.nginx b/compose/codetogether.nginx index 54d10cb..2152f44 100644 --- a/compose/codetogether.nginx +++ b/compose/codetogether.nginx @@ -1,3 +1,43 @@ +server { + listen 443 ssl http2; + server_name ; + proxy_buffer_size 128k; + proxy_buffers 4 256k; + ssl_certificate ; + ssl_certificate_key ; + ssl_dhparam ; + ssl_prefer_server_ciphers on; + ssl_protocols TLSv1.2; + ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; + location / { + # Similar proxy logic for headers + set $realIP $remote_addr; + set $forwardTo $proxy_add_x_forwarded_for; + set $reqHost $http_host; + client_max_body_size 32M; + if ($http_x_real_ip != '') { + set $realIP $http_x_real_ip; + } + if ($http_x_forwarded_for != '') { + set $forwardTo $http_x_forwarded_for; + } + add_header C-Real-IP $realIP; + add_header C-Forwarded-For $forwardTo; + add_header C-Request-Host $reqHost; + proxy_set_header X-Real-IP $realIP; + proxy_set_header X-Forwarded-For $forwardTo; + proxy_set_header Host $reqHost; + proxy_set_header X-NginX-Proxy true; + proxy_http_version 1.1; + proxy_redirect off; + proxy_pass http://codetogether-collab:1080; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_read_timeout 360; + proxy_connect_timeout 360; + proxy_send_timeout 360; + } +} server { server_name ; listen 443 ssl http2; @@ -14,10 +54,10 @@ server { ssl_protocols TLSv1.2; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; - # create the passthrough to the CodeTogether HQ container + # create the passthrough to the CodeTogether Intel container location / { - # set passthru parameters for the CodeTogether HQ container + # set passthru parameters for the CodeTogether Intel container set $realIP $remote_addr; set $forwardTo $proxy_add_x_forwarded_for; set $reqHost $http_host; @@ -32,7 +72,7 @@ server { proxy_set_header Host $reqHost; # setup the backend to service the HQ requests - proxy_pass http://127.0.0.1:1080; + proxy_pass http://codetogether-intel:1080; proxy_set_header X-NginX-Proxy true; proxy_http_version 1.1; proxy_redirect off; diff --git a/compose/compose.yaml b/compose/compose.yaml index b67a89c..534fd87 100644 --- a/compose/compose.yaml +++ b/compose/compose.yaml @@ -1,9 +1,37 @@ -services: - codetogether-intel: - image: hub.edge.codetogether.com/releases/codetogether-intel:latest +services: + codetogether-collab: + image: registry.digitalocean.com/codetogether-registry/codetogether-collab:latest + container_name: codetogether-collab + environment: + - CT_LICENSE_URL=http://codetogether-intel:1080 + - CT_SERVER_URL=https://your-collab-server-fqdn + - CT_INTEL_SECRET=your-collab-intel-secret + - CT_AV_ENABLED=false + - CT_AV_LAN_IP=auto + networks: + - hqnet + depends_on: + codetogether-hq: + condition: service_healthy + nginx: + image: nginx:latest + container_name: codetogether-nginx + ports: + - "443:443" + volumes: + - ./nginx/nginx.conf:/etc/nginx/nginx.conf + - ./nginx/ssl:/etc/nginx/ssl + - ./nginx/log:/var/log/nginx + networks: + - hqnet + depends_on: + codetogether-hq: + condition: service_healthy + codetogether-hq: + image: registry.digitalocean.com/codetogether-registry/codetogether-intel:latest container_name: codetogether-intel environment: - - CT_HQ_BASE_URL=https://your-hq-server-fqdn + - CT_HQ_BASE_URL=https://your-intel-server-fqdn networks: - hqnet volumes: @@ -18,10 +46,12 @@ services: start_period: 20s interval: 10s timeout: 10s - retries: 30 + retries: 50 cassandra: image: cassandra:latest container_name: codetogether-cassandra + ports: + - 9042:9042 networks: - hqnet environment: @@ -38,7 +68,7 @@ services: start_period: 30s interval: 10s timeout: 10s - retries: 20 + retries: 70 networks: hqnet: - driver: bridge + driver: bridge \ No newline at end of file diff --git a/compose/cthq.properties b/compose/cthq.properties index 9d9c916..b27661b 100644 --- a/compose/cthq.properties +++ b/compose/cthq.properties @@ -3,6 +3,8 @@ hq.base.url=https:// hq.sso.redirect.uri=https:///api/v1/auth/sso/success/insights hq.sso.client.id= hq.sso.client.secret= +hq.collab.url=https://your-collab-server-fqdn +hq.collab.secret= # Generic single sign-on configuration hq.sso.client.issuer.url=https:////.well-known/openid-configuration