update config testc

This commit is contained in:
ddadmin 2025-01-24 15:55:40 +03:00
parent 2a685b1be9
commit 20544e8a41
26 changed files with 287 additions and 161 deletions

9
.env
View File

@ -1,10 +1,11 @@
COMPOSE_PROJECT_NAME=testc COMPOSE_PROJECT_NAME=testc
NETWORK=testc NETWORK=testc
FRONT_TAG=DDB-1540 FRONT_TAG=develop
DOTDOT_TAG=DDB-1540 DOTDOT_TAG=develop
LMS_TAG=DD-3626-STORY LMS_TAG=develop
DASHBORD_TAG=master DASHBORD_TAG=DDB-1587
ADMIN_TAG=master
MYSQL_PORT=0.0.0.0:33063 MYSQL_PORT=0.0.0.0:33063
MYSQL_ROOT_PASSWORD=root MYSQL_ROOT_PASSWORD=root

3
configs/admin/.env Normal file
View File

@ -0,0 +1,3 @@
NUXT_HOST=0.0.0.0
NUXT_PORT=3000
DOMAIN=testcadmin.dot-dot.ru

10
configs/admin/entrypoint.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
DOMAIN="${DOMAIN:-lmsadmin.dot-dot.ru}"
for x in $(grep -lrw "lmsadmin.dot-dot.ru" .nuxt/);do
echo "replace lmsadmin.dot-dot.ru to https://${DOMAIN} in $x"
sed -i -e "s/lmsadmin.dot-dot.ru/${DOMAIN}/g" $x;
done
"$@"

View File

@ -1,11 +1,11 @@
APP_NAME="DOT-DOT DASHBOARD" APP_NAME="DOT-DOT admin"
APP_ENV=local APP_ENV=production
APP_KEY=base64:UdElHcbd1MSsWoLOn8LietbdAhHiyT/C6+dpy+kYfkQ= APP_KEY=base64:cBv45v/Wb116dW+1zoKPxsIsmXBbIJBlL/bOiLYnCEk=
APP_DEBUG=true APP_DEBUG=true
APP_TIMEZONE=UTC APP_TIMEZONE=UTC
APP_URL=https://testcdashboard.dot-dot.ru APP_URL=https://testcadmin.dot-dot.ru
FRONTEND_URL=https://testcdashboard.dot-dot.ru FRONTEND_URL=https://testcadmin.dot-dot.ru
ASSET_URL=https://testcdashboard.dot-dot.ru ASSET_URL=https://testcadmin.dot-dot.ru
APP_EMAIL_DOMAIN="dot-dot.ru" APP_EMAIL_DOMAIN="dot-dot.ru"
APP_LOCALE=ru APP_LOCALE=ru
@ -25,6 +25,7 @@ LOG_LEVEL=debug
DEFAULT_DB_CONNECTION=dashboard DEFAULT_DB_CONNECTION=dashboard
#Параметры подключения к базе панели управления #Параметры подключения к базе панели управления
DASHBOARD_DB_HOST=db DASHBOARD_DB_HOST=db
DASHBOARD_DB_PORT=3306 DASHBOARD_DB_PORT=3306
DASHBOARD_DB_DATABASE=dashboard DASHBOARD_DB_DATABASE=dashboard
@ -32,11 +33,12 @@ DASHBOARD_DB_USERNAME=root
DASHBOARD_DB_PASSWORD=root DASHBOARD_DB_PASSWORD=root
#Параметры подключения к базе dot-dot #Параметры подключения к базе dot-dot
DOT_DOT_DB_HOST=db DOT_DOT_DB_HOST=db
DOT_DOT_DB_PORT=3306 DOT_DOT_DB_PORT=3306
DOT_DOT_DB_DATABASE=dot DOT_DOT_DB_DATABASE=dot
DOT_DOT_DB_USERNAME=root DOT_DOT_DB_USERNAME=dot
DOT_DOT_DB_PASSWORD=root DOT_DOT_DB_PASSWORD=dot
SESSION_DRIVER=database SESSION_DRIVER=database
SESSION_LIFETIME=120 SESSION_LIFETIME=120
@ -76,3 +78,5 @@ AWS_USE_PATH_STYLE_ENDPOINT=false
VITE_APP_NAME="${APP_NAME}" VITE_APP_NAME="${APP_NAME}"
OCTANE_SERVER=frankenphp OCTANE_SERVER=frankenphp
DOT_DOT_HOST=https://testc.dot-dot.ru

View File

@ -1,5 +0,0 @@
{
admin {
disabled false
}
}

View File

@ -1,129 +0,0 @@
{
"apps": {
"frankenphp": {},
"http": {
"servers": {
"srv0": {
"listen": [
":443"
],
"routes": [
{
"handle": [
{
"handler": "subroute",
"routes": [
{
"handle": [
{
"handler": "vars",
"root": "public/"
},
{
"encodings": {
"br": {},
"gzip": {},
"zstd": {}
},
"handler": "encode",
"prefer": [
"zstd",
"br",
"gzip"
]
}
]
},
{
"handle": [
{
"handler": "static_response",
"headers": {
"Location": [
"{http.request.orig_uri.path}/"
]
},
"status_code": 308
}
],
"match": [
{
"file": {
"try_files": [
"{http.request.uri.path}/index.php"
]
},
"not": [
{
"path": [
"*/"
]
}
]
}
]
},
{
"handle": [
{
"handler": "rewrite",
"uri": "{http.matchers.file.relative}"
}
],
"match": [
{
"file": {
"split_path": [
".php"
],
"try_files": [
"{http.request.uri.path}",
"{http.request.uri.path}/index.php",
"index.php"
]
}
}
]
},
{
"handle": [
{
"handler": "php",
"split_path": [
".php"
]
}
],
"match": [
{
"path": [
"*.php"
]
}
]
},
{
"handle": [
{
"handler": "file_server"
}
]
}
]
}
],
"match": [
{
"host": [
"testcdashboard.dot-dot.ru"
]
}
],
"terminal": true
}
]
}
}
}
}
}

View File

@ -1 +0,0 @@
Deny from all

0
configs/lms/.env Normal file → Executable file
View File

10
configs/lms/entrypoint.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh -x
DOMAIN="${DOMAIN:-lms.dot-dot.ru}"
for x in $(grep -lrw "lms.dot-dot.ru" .nuxt/);do
echo "replace lms.dot-dot.ru to https://${DOMAIN} in $x"
sed -i -e "s/lms.dot-dot.ru/${DOMAIN}/g" $x;
done
"$@"

View File

@ -0,0 +1,16 @@
server {
server_name testcadmin.dot-dot.ru;
client_max_body_size 10m;
location / {
proxy_pass http://dashboard:80;
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;
}
}

0
configs/nginx/conf.d/default.conf Normal file → Executable file
View File

4
configs/nginx/conf.d/lms.conf Normal file → Executable file
View File

@ -8,8 +8,8 @@ server {
listen 443 ssl; listen 443 ssl;
server_name testclms.dot-dot.ru; server_name testclms.dot-dot.ru;
ssl_certificate /etc/nginx/ssl/dot2023.crt; ssl_certificate /etc/nginx/ssl/dot2024.crt;
ssl_certificate_key /etc/nginx/ssl/dot2023.key; ssl_certificate_key /etc/nginx/ssl/dot2024.key;
root /application/public; root /application/public;

View File

@ -0,0 +1,48 @@
server {
listen 80;
server_name testcrabbitmq.dot-dot.ru;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name testcrabbitmq.dot-dot.ru;
access_log /var/log/nginx/rabbitmq_access.log json;
error_log /var/log/nginx/rabbitmq_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;
}
}

0
configs/nginx/nginx.conf Normal file → Executable file
View File

0
configs/nginx/ssl/dot2023.crt Normal file → Executable file
View File

0
configs/nginx/ssl/dot2023.key Normal file → Executable file
View File

0
configs/nginx/ssl/dot2024.crt Normal file → Executable file
View File

0
configs/nginx/ssl/dot2024.key Normal file → Executable file
View File

0
configs/nuxt/.env Normal file → Executable file
View File

10
configs/nuxt/entrypoint.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
DOMAIN="${DOMAIN:-dot-dot.ru}"
for x in $(grep -lrw "dot-dot.ru" .nuxt/);do
echo "replace dot-dot.ru to https://${DOMAIN} in $x"
sed -i -e "s/dot-dot.ru/${DOMAIN}/g" $x;
done
"$@"

0
configs/php/.env Normal file → Executable file
View File

16
configs/php/.env.local Normal file → Executable file
View File

@ -1,5 +1,5 @@
CONTAINER_NAME=php CONTAINER_NAME=php
APP_ENV=prod APP_ENV=dev
NotificationBuildServicejSP_KEY=16e93b225c730920ac5741a8d8df788f NotificationBuildServicejSP_KEY=16e93b225c730920ac5741a8d8df788f
DADATA_API_TOKEN=c9aa5fdc338a746e23ce91ceb6fdb9e635749833 DADATA_API_TOKEN=c9aa5fdc338a746e23ce91ceb6fdb9e635749833
@ -117,8 +117,6 @@ ML_REGULAR_DIRECTION_RELEVANCE_CARRIERS_URL=https://ml.dot-dot.ru/v2/schedule/ca
ML_REGULAR_DIRECTION_URL=https://ml.dot-dot.ru/v2/schedule/transport ML_REGULAR_DIRECTION_URL=https://ml.dot-dot.ru/v2/schedule/transport
ACCOUNTING_AUDIT_URL="https://crm.dot-dot.ru/TTLBuhreport/hs/TT/reconciliationreport"
###> YandexTracker ### ###> YandexTracker ###
YTRACKER_API_TOKEN="y0_AgAEA7qkKFmeAAjF8AAAAADXovQd6htdkt7LTDW_sNHCz7qV9zdVHaQ" YTRACKER_API_TOKEN="y0_AgAEA7qkKFmeAAjF8AAAAADXovQd6htdkt7LTDW_sNHCz7qV9zdVHaQ"
YTRACKER_ORGANISATION_ID=355207 YTRACKER_ORGANISATION_ID=355207
@ -127,9 +125,9 @@ YTRACKER_ORGANISATION_ID=355207
SMARTCAPTCHA_SERVER_KEY=ysc2_GLQZ8QPaFh0eXqZ5KaRMuRRZOX7qNNMy7P9Mq82V6c4e7b81 SMARTCAPTCHA_SERVER_KEY=ysc2_GLQZ8QPaFh0eXqZ5KaRMuRRZOX7qNNMy7P9Mq82V6c4e7b81
###> sentry/sentry-symfony ### ###> sentry/sentry-symfony ###
SENTRY_DSN="https://69bb249adbab80b23cf043b276a27fde@sentry.dot-dot.ru/4" SENTRY_DSN="https://1127a3ada375b040486c3ab0d86cbcab@sentry.dot-dot.ru/5"
SENTRY_SERVER_NAME=pre-prod SENTRY_SERVER_NAME=testc
SENTRY_SERVER_USER_NAME=admin SENTRY_SERVER_USER_NAME=tachkov
###< sentry/sentry-symfony ### ###< sentry/sentry-symfony ###
ML_CALCULATOR_TRADE_ONLY_URL=https://ml.dot-dot.ru/v1/tender/price ML_CALCULATOR_TRADE_ONLY_URL=https://ml.dot-dot.ru/v1/tender/price
@ -155,7 +153,6 @@ USER_TRUST_CHECK_BACKEND=true
QUEUE_DSN_USER_TRUST=amqp://guest:guest@rabbitmq:5672/%2f/USER_TRUST QUEUE_DSN_USER_TRUST=amqp://guest:guest@rabbitmq:5672/%2f/USER_TRUST
CHROMIUM_BROWSER_SYS_PATH="/usr/bin/chromium-browser" CHROMIUM_BROWSER_SYS_PATH="/usr/bin/chromium-browser"
### DD-3326 check_carrier&drivers in OTK 2_Step ### ### DD-3326 check_carrier&drivers in OTK 2_Step ###
@ -165,3 +162,8 @@ OTK_API_TOKEN="Q5vBE9jusg38Rk7wHt2bzycT4K6pePFZ"
ACCOUNTING_AUDIT_LOGIN=ReportServis ACCOUNTING_AUDIT_LOGIN=ReportServis
ACCOUNTING_AUDIT_PASSWORD=fE7mubiv ACCOUNTING_AUDIT_PASSWORD=fE7mubiv
#ML_CARRIER_SCORING=https://ml.dot-dot.ru/v3/classification/carrier/scoring
QUEUE_DSN_RELEVANT_CARRIER_EXPORT=amqp://ddadmin:Utahth9aeshahgh3saik@rabbitmq:5672/%2f/RELEVANT_CARRIER_EXPORT
ML_CALCULATOR_SPOT_URL=https://ml.dot-dot.ru/v1/price_calculator/spot

151
configs/rabbitmq/definitions.json Executable file
View File

@ -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": {}
}
]
}

1
configs/rabbitmq/enabled_plugins Normal file → Executable file
View File

@ -0,0 +1 @@
[rabbitmq_management,rabbitmq_prometheus].

1
configs/rabbitmq/rabbitmq.conf Executable file
View File

@ -0,0 +1 @@
management.load_definitions = /etc/rabbitmq/definitions.json

View File

@ -58,8 +58,10 @@ services:
command: npm run start command: npm run start
volumes: volumes:
- ./configs/nuxt/.env:/app/.env - ./configs/nuxt/.env:/app/.env
- ./configs/nuxt/entrypoint.sh:/entrypoint.sh
env_file: env_file:
- ./configs/nuxt/.env - ./configs/nuxt/.env
entrypoint: /entrypoint.sh
networks: networks:
- dd - dd
@ -69,28 +71,28 @@ services:
command: npm run start command: npm run start
volumes: volumes:
- ./configs/lms/.env:/app/.env - ./configs/lms/.env:/app/.env
- ./configs/lms/entrypoint.sh:/entrypoint.sh
env_file: env_file:
- ./configs/lms/.env - ./configs/lms/.env
entrypoint: /entrypoint.sh
networks: networks:
- dd - dd
dashboard: admin:
image: registry.dot-dot.ru/dashboard:${DASHBORD_TAG} image: registry.dot-dot.ru/dashboard:${DASHBORD_TAG}
# command: sh -c "php-fpm -D && nginx -g 'daemon off;'"
command: frankenphp php-server -r /application/public command: frankenphp php-server -r /application/public
restart: unless-stopped restart: unless-stopped
environment: environment:
- SERVER_NAME=testcdashboard.dot-dot.ru - SERVER_NAME=testcadmin.dot-dot.ru
volumes: volumes:
- ./configs/dashboard/.env:/application/.env - ./configs/dashboard/.env:/application/.env
- ./configs/dashboard/config:/config
depends_on: depends_on:
- db - db
networks: networks:
dd: dd:
ingress: ingress:
aliases: aliases:
- ${NETWORK}-dashboard - ${NETWORK}-admin
nginx: nginx:
image: nginx:1.25.3-alpine3.18 image: nginx:1.25.3-alpine3.18
@ -120,6 +122,8 @@ services:
volumes: volumes:
- rabbitmq_volume:/var/lib/rabbitmq - rabbitmq_volume:/var/lib/rabbitmq
- ./configs/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins - ./configs/rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins
- ./configs/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json
- ./configs/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
environment: environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME} - RABBITMQ_DEFAULT_USER=${RABBITMQ_USERNAME}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD} - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD}