From 17559769d11f51370d585c0d27b30783b06fd9e8 Mon Sep 17 00:00:00 2001 From: Sergey Paramoshkin Date: Sun, 2 Feb 2025 18:51:48 +0300 Subject: [PATCH] sync configs --- configs/admin/.env | 2 - configs/cabinet/.env | 12 ++- configs/nginx/conf.d/admin.conf | 9 ++ configs/nginx/conf.d/default.conf | 13 ++- configs/nginx/conf.d/rabbitmq.conf | 48 +++++++++ configs/nginx/templates/default | 105 -------------------- configs/rabbitmq/definitions.json | 151 +++++++++++++++++++++++++++++ configs/rabbitmq/enabled_plugins | 1 + configs/rabbitmq/rabbitmq.conf | 1 + 9 files changed, 231 insertions(+), 111 deletions(-) create mode 100755 configs/nginx/conf.d/rabbitmq.conf delete mode 100644 configs/nginx/templates/default create mode 100644 configs/rabbitmq/definitions.json create mode 100755 configs/rabbitmq/rabbitmq.conf diff --git a/configs/admin/.env b/configs/admin/.env index a481384..61b9a4f 100644 --- a/configs/admin/.env +++ b/configs/admin/.env @@ -77,6 +77,4 @@ AWS_USE_PATH_STYLE_ENDPOINT=false VITE_APP_NAME="${APP_NAME}" -OCTANE_SERVER=frankenphp - DOT_DOT_HOST=https://staging.dot-dot.ru diff --git a/configs/cabinet/.env b/configs/cabinet/.env index 016da3c..5ab4c38 100644 --- a/configs/cabinet/.env +++ b/configs/cabinet/.env @@ -1,3 +1,13 @@ NUXT_HOST=0.0.0.0 NUXT_PORT=3000 -DOMAIN=stagingadmin.dot-dot.ru \ No newline at end of file +NUXT_ENV_DEVALUE_LOG_LEVEL=silent +WS_PROTOCOL=wss +BASE_URL=stagingcabinet.dot-dot.ru +API_URL=https://staging.dot-dot.ru/ +DOMAIN=stagingcabinet.dot-dot.ru + +APP_HOST=staging.dot-dot.ru +APP_SCHEME=https +APP_ENVIRONMENT=production +DADATA_API_TOKEN=c9aa5fdc338a746e23ce91ceb6fdb9e635749833 +YANDEX_METRIKA_ID=50156956 diff --git a/configs/nginx/conf.d/admin.conf b/configs/nginx/conf.d/admin.conf index 8c37f9e..a423e05 100644 --- a/configs/nginx/conf.d/admin.conf +++ b/configs/nginx/conf.d/admin.conf @@ -1,3 +1,9 @@ +server { + listen 80; + server_name stagingaadmin.dot-dot.ru; + return 301 https://$server_name$request_uri; +} + server { listen 443 ssl ; server_name stagingadmin.dot-dot.ru; @@ -7,6 +13,9 @@ server { client_max_body_size 10m; + access_log /var/log/nginx/stagingadmin.dot-dot.ru_access.log json; + error_log /var/log/nginx/stagingadmin.dot-dot.ru_error.log; + location / { proxy_pass https://staging-admin-1:443; proxy_http_version 1.1; diff --git a/configs/nginx/conf.d/default.conf b/configs/nginx/conf.d/default.conf index e9b29f6..273c8da 100644 --- a/configs/nginx/conf.d/default.conf +++ b/configs/nginx/conf.d/default.conf @@ -1,14 +1,21 @@ +server { + listen 80; + server_name staging.dot-dot.ru; + return 301 https://$server_name$request_uri; +} + server { listen 443 ssl ; - server_name staging.dot-dot.ru; + server_name testa.dot-dot.ru; ssl_certificate /etc/nginx/ssl/dot2024.crt; ssl_certificate_key /etc/nginx/ssl/dot2024.key; + root /application/public; - client_max_body_size 10m; - + client_max_body_size 30m; + client_body_buffer_size 30M; location / { proxy_pass http://nuxt:3000; diff --git a/configs/nginx/conf.d/rabbitmq.conf b/configs/nginx/conf.d/rabbitmq.conf new file mode 100755 index 0000000..afb9fe9 --- /dev/null +++ b/configs/nginx/conf.d/rabbitmq.conf @@ -0,0 +1,48 @@ +server { + listen 80; + server_name testarabbitmq.dot-dot.ru; + return 301 https://$server_name$request_uri; +} + +server { + listen 443 ssl; + server_name testarabbitmq.dot-dot.ru; + + access_log /var/log/nginx/rabbitmqtesta.dot-dot.ru_access.log json; + error_log /var/log/nginx/rabbitmqtesta.dot-dot.ru_error.log; + + ssl_certificate /etc/nginx/ssl/dot2024.crt; + ssl_certificate_key /etc/nginx/ssl/dot2024.key; + + proxy_buffer_size 128k; + proxy_buffers 4 128k; + client_body_buffer_size 32k; + client_header_buffer_size 256k; + large_client_header_buffers 4 256k; + + location / { + client_max_body_size 600m; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://rabbitmq:15672; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; + } + + location /metrics { + client_max_body_size 600m; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Scheme $scheme; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://rabbitmq:15692/metrics; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + send_timeout 600; + } +} \ No newline at end of file diff --git a/configs/nginx/templates/default b/configs/nginx/templates/default deleted file mode 100644 index 3c15b2f..0000000 --- a/configs/nginx/templates/default +++ /dev/null @@ -1,105 +0,0 @@ -server { - server_name staging.dot-dot.ru; - - root /application/public; - -client_max_body_size 10m; - - - location / { - proxy_pass http://nuxt:3000; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - chunked_transfer_encoding off; - proxy_buffering off; - proxy_cache off; - } - - location /socket.io/auctionreload { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - proxy_pass http://php:${PHP_SOCKET_PORT}/; - } - - location @rewriteapp { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /storybook { - alias /application/nuxt/storybook-static; - } - - location /logout { - try_files $uri @rewriteapp; - } - - location /help { - alias /application/help-platform/src/.vuepress/dist; - } - - location /api { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /clockwork { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /__clockwork { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /pdf { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /1c { - rewrite ^(.*)$ /index.php/$1 last; - } - - location /socket { - try_files $uri @rewriteapp; - } - - location /admin { - try_files $uri @rewriteapp; - } - - location /media { - try_files $uri @rewriteapp; - } - - location /img { - alias /application/public/img; - } - - location ~ ^/index\.php(/|$) { - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' $http_origin; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization'; - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 204; - } - - add_header 'Access-Control-Allow-Origin' $http_origin; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,X-Expeditor-Domain,Authorization'; - - fastcgi_pass php:9001; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - } - - error_log /var/log/nginx/dot_dot_error.log; - access_log /var/log/nginx/dot_dot_access.log; -} diff --git a/configs/rabbitmq/definitions.json b/configs/rabbitmq/definitions.json new file mode 100644 index 0000000..1dcf26f --- /dev/null +++ b/configs/rabbitmq/definitions.json @@ -0,0 +1,151 @@ +{ + "rabbit_version": "3.12.1", + "rabbitmq_version": "3.12.1", + "product_name": "RabbitMQ", + "product_version": "3.12.1", + "users": [ + { + "name": "ddadmin", + "password_hash": "iitSzcQJwX/NeX6ENPfc3ITxfyWBAwz4+8Cz1yZBzibz5zHv", + "hashing_algorithm": "rabbit_password_hashing_sha256", + "tags": [ + "administrator" + ], + "limits": {} + }, + { + "name": "guest", + "password_hash": "Yn3TgLYeK0bubvTm0HXfYnqh39XM2sCaA3C6b/fN928iFB8E", + "hashing_algorithm": "rabbit_password_hashing_sha256", + "tags": [ + "management" + ], + "limits": {} + } + ], + "vhosts": [ + { + "name": "/" + } + ], + "permissions": [ + { + "user": "ddadmin", + "vhost": "/", + "configure": ".*", + "write": ".*", + "read": ".*" + }, + { + "user": "guest", + "vhost": "/", + "configure": ".*", + "write": ".*", + "read": ".*" + } + ], + "topic_permissions": [ + { + "user": "guest", + "vhost": "/", + "exchange": "", + "write": ".*", + "read": ".*" + } + ], + "parameters": [], + "global_parameters": [ + { + "name": "internal_cluster_id", + "value": "rabbitmq-cluster-id-IdnQKai-TysuN7ZwZMtH5w" + } + ], + "policies": [], + "queues": [ + { + "name": "OC_CARRIER_OFFERS", + "vhost": "/", + "durable": true, + "auto_delete": false, + "arguments": {} + }, + { + "name": "STATISTIC_EXPORT", + "vhost": "/", + "durable": true, + "auto_delete": false, + "arguments": {} + }, + { + "name": "USER_TRUST", + "vhost": "/", + "durable": true, + "auto_delete": false, + "arguments": {} + } + ], + "exchanges": [ + { + "name": "STATISTIC_EXPORT", + "vhost": "/", + "type": "fanout", + "durable": true, + "auto_delete": false, + "internal": false, + "arguments": {} + }, + { + "name": "USER_TRUST", + "vhost": "/", + "type": "fanout", + "durable": true, + "auto_delete": false, + "internal": false, + "arguments": {} + }, + { + "name": "OC_CARRIER_OFFERS", + "vhost": "/", + "type": "fanout", + "durable": true, + "auto_delete": false, + "internal": false, + "arguments": {} + }, + { + "name": "delays", + "vhost": "/", + "type": "direct", + "durable": true, + "auto_delete": false, + "internal": false, + "arguments": {} + } + ], + "bindings": [ + { + "source": "OC_CARRIER_OFFERS", + "vhost": "/", + "destination": "OC_CARRIER_OFFERS", + "destination_type": "queue", + "routing_key": "", + "arguments": {} + }, + { + "source": "STATISTIC_EXPORT", + "vhost": "/", + "destination": "STATISTIC_EXPORT", + "destination_type": "queue", + "routing_key": "", + "arguments": {} + }, + { + "source": "USER_TRUST", + "vhost": "/", + "destination": "USER_TRUST", + "destination_type": "queue", + "routing_key": "", + "arguments": {} + } + ] +} \ No newline at end of file diff --git a/configs/rabbitmq/enabled_plugins b/configs/rabbitmq/enabled_plugins index e69de29..318ea04 100644 --- a/configs/rabbitmq/enabled_plugins +++ b/configs/rabbitmq/enabled_plugins @@ -0,0 +1 @@ +[rabbitmq_management,rabbitmq_prometheus]. \ No newline at end of file diff --git a/configs/rabbitmq/rabbitmq.conf b/configs/rabbitmq/rabbitmq.conf new file mode 100755 index 0000000..916cb91 --- /dev/null +++ b/configs/rabbitmq/rabbitmq.conf @@ -0,0 +1 @@ +management.load_definitions = /etc/rabbitmq/definitions.json \ No newline at end of file