From 4d5b10eab297b6e75c43f6f753f4a338088cb938 Mon Sep 17 00:00:00 2001 From: Teo Gebhard Date: Tue, 29 Apr 2025 17:05:56 +0300 Subject: [PATCH] rm platform, nginx --- README.md | 3 - custom-nginx-reverse-proxy.conf | 178 -------------------------------- docker-compose-ci.yml | 16 --- docker-compose.yml | 43 -------- 4 files changed, 240 deletions(-) delete mode 100644 custom-nginx-reverse-proxy.conf diff --git a/README.md b/README.md index 31e2b35..cd48bed 100644 --- a/README.md +++ b/README.md @@ -209,8 +209,6 @@ streamr-docker-dev start --wait - 2 broker nodes + 1 storage Streamr network nodes. This creates a local and private Streamr Network. - 3 x [Tracker](https://github.com/streamr-dev/broker) - Helps node discovery in the Strearm Network -- 1 x [Hub frontend](https://github.com/streamr-dev/streamr-platform/app) - - See more detailed build instructions in the streamr-platform repo - 1 x [TheGraph node](https://github.com/streamr-dev/network-contracts) - GraphQL queries at http://localhost:8000/subgraphs/name/githubname/subgraphname - GUI to past GraphQL queries: http://192.168.0.8:8000/subgraphs/name/githubname/subgraphname/graphql @@ -237,7 +235,6 @@ streamr-docker-dev start --wait - 1 x Apache Cassandra instance with `streamr_dev` keyspace - 1 x [Ethereum Parity node ("mainchain")](https://github.com/streamr-dev/open-ethereum-poa) - 1 x [Ethereum Parity node ("sidechain")](https://github.com/streamr-dev/open-ethereum-poa) -- 1 x nginx - 1 x Postgres DB for TheGraph - 1 x ipfs for TheGraph - 1 x adapter for ENS queries from sidechain to mainchain diff --git a/custom-nginx-reverse-proxy.conf b/custom-nginx-reverse-proxy.conf deleted file mode 100644 index 1c71d66..0000000 --- a/custom-nginx-reverse-proxy.conf +++ /dev/null @@ -1,178 +0,0 @@ -worker_processes auto; - -events { - accept_mutex on; - multi_accept on; - worker_connections 512; -} - -http { - include mime.types; - server_names_hash_bucket_size 128; - sendfile on; - - proxy_buffers 8 1024k; - proxy_buffer_size 1024k; - aio on; - directio 4m; - tcp_nopush on; - tcp_nodelay on; - - upstream platform { - server 10.200.10.1:3333; - } - - upstream network_explorer { - server 10.200.10.1:3334; - } - - upstream brokers_ws { - server 10.200.10.1:8690; - server 10.200.10.1:8790; - keepalive 20; - keepalive_requests 50; - keepalive_timeout 60s; - } - - upstream brokers_http { - server 10.200.10.1:8691; - server 10.200.10.1:8791; - keepalive 20; - keepalive_requests 50; - keepalive_timeout 60s; - } - - upstream storage_http { - server 10.200.10.1:8891; - } - - upstream mainchain_rpc_http { - server 10.200.10.1:8545; - } - - upstream mainchain_rpc_ws { - server 10.200.10.1:8450; - } - - upstream sidechain_rpc_http { - server 10.200.10.1:8546; - } - - upstream sidechain_rpc_ws { - server 10.200.10.1:8451; - } - - server { - proxy_connect_timeout 10s; - - listen 80; - - # UNCOMMENT FOR SSL - # ----------------- - - # listen 443 ssl; - # ssl_certificate /etc/nginx/mounted-certs/bundle.crt; - # ssl_certificate_key /etc/nginx/mounted-certs/secret.key; - # if ($scheme = http) { - # return 301 https://$host$request_uri; - # } - - # Enables all versions of TLS, but not SSLv2 or 3 which are weak and now deprecated. - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - - # Disables all weak ciphers - ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; - - location /health_check { - return 200; - access_log off; - add_header Content-Type text/plain; - add_header Cache-Control no-cache; - keepalive_timeout 0; - } - - # Websocket endpoint - location /api/v2/ws { - add_header X-debug "/api/v2/ws"; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_pass http://brokers_ws; - proxy_read_timeout 240s; - } - - # Data REST endpoints - location ~ /api/v2/streams/(.*)/(data|metadata/partitions/.*|storage/partitions/.*|data/partitions/.*)$ { - add_header X-debug "/api/v2/streams"; - proxy_pass http://storage_http; - proxy_read_timeout 240s; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - # Data Volume endpoint - location /api/v2/volume { - add_header X-debug "/api/v2/volume"; - proxy_pass http://brokers_http; - proxy_read_timeout 240s; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - # Network explorer - location /network-explorer/ { - proxy_pass http://network_explorer$request_uri; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - ### Utility paths proxied to the Ethereum nodes in the docker stack. Useful if SSL is terminated at nginx ### - - location /mainchain-rpc/http/ { - proxy_pass http://mainchain_rpc_http/; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - location /mainchain-rpc/ws/ { - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_pass http://mainchain_rpc_ws/; - } - - location /sidechain-rpc/http/ { - proxy_pass http://sidechain_rpc_http/; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - location /sidechain-rpc/ws/ { - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_http_version 1.1; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $host; - proxy_pass http://sidechain_rpc_ws/; - } - - # Proxy everything else to the Hub app - location / { - add_header X-debug "/"; - proxy_pass http://platform; - proxy_redirect off; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Host $server_name; - proxy_http_version 1.1; - proxy_set_header Connection ""; - } - - } -} - diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index affc89e..e12c9ad 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -24,14 +24,6 @@ services: memory: 500M reservations: memory: 250M - nginx: - deploy: - resources: - limits: - cpus: '1.0' - memory: 500M - reservations: - memory: 6M broker-node-storage-1: deploy: resources: @@ -56,14 +48,6 @@ services: memory: 200M reservations: memory: 150M - platform: - deploy: - resources: - limits: - cpus: '0.50' - memory: 50M - reservations: - memory: 10M network-explorer: deploy: resources: diff --git a/docker-compose.yml b/docker-compose.yml index 63911b6..18305fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,33 +69,6 @@ services: interval: 5s timeout: 10s retries: 10 - nginx: - container_name: streamr-dev-nginx - image: nginx:1.25.0 - networks: - - streamr-network - restart: unless-stopped - ports: - - "80:80" - - "443:443" - volumes: - - type: bind - source: ./custom-nginx-reverse-proxy.conf - target: /etc/nginx/nginx.conf - read_only: true - bind: - propagation: rprivate - - type: bind - source: ./certs - target: /etc/nginx/mounted-certs - read_only: true - bind: - propagation: rprivate - healthcheck: - test: ["CMD", "curl", "-f", "http://localhost/health_check"] - interval: 5s - timeout: 10s - retries: 10 entry-point: container_name: streamr-dev-entry-point image: streamr/node:dev @@ -191,22 +164,6 @@ services: interval: 30s timeout: 10s retries: 20 - platform: - container_name: streamr-dev-platform - image: streamr/platform:dev - networks: - - streamr-network - ports: - - "3333:80" - depends_on: - - parity-node0 - environment: - DATA_UNIONS: "on" - healthcheck: - test: ["CMD", "curl", "--fail", "--silent", "--show-error", "--max-time", "9", "http://localhost"] - interval: 10s - timeout: 10s - retries: 60 network-explorer: container_name: streamr-dev-network-explorer image: streamr/network-explorer:dev