From 6e9446873c3014da16f86092f3cbc1b05a470ee2 Mon Sep 17 00:00:00 2001 From: Sohit Date: Fri, 15 Mar 2024 10:52:50 +0530 Subject: [PATCH 1/2] rabbitmq ssl config in proxy-docker-compose --- static/artifacts/satellite/proxy-docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/static/artifacts/satellite/proxy-docker-compose.yml b/static/artifacts/satellite/proxy-docker-compose.yml index 179ba05f3..c45d6bed4 100644 --- a/static/artifacts/satellite/proxy-docker-compose.yml +++ b/static/artifacts/satellite/proxy-docker-compose.yml @@ -11,6 +11,7 @@ services: retries: 10 ports: - '5672:5672' + - '5671:5671' - '15672:15672' environment: RABBITMQ_DEFAULT_USER: ${RABBITMQ_USERNAME:-levoai} @@ -18,6 +19,14 @@ services: # send logs to stdout, ref: https://www.rabbitmq.com/logging.html#log-file-location RABBITMQ_LOGS: '-' user: rabbitmq + command: > + bash -c "mkdir -p /opt/rabbitmq/resources && + openssl req -x509 -nodes -newkey rsa:4096 -subj "/C=IN/ST=Telangana/L=Hyderabad/O=Levo.ai/OU=Security/CN=localhost:5671" -keyout /opt/rabbitmq/resources/ca.key -out /opt/rabbitmq/resources/ca.crt -days 365000 && + openssl req -nodes -new -newkey rsa:4096 -subj "/C=IN/ST=Telangana/L=Hyderabad/O=Levo.ai/OU=Security/CN=localhost:5671" -keyout /opt/rabbitmq/resources/server.key -out /opt/rabbitmq/resources/server.csr -days 365000 && + openssl x509 -req -in /opt/rabbitmq/resources/server.csr -CA /opt/rabbitmq/resources/ca.crt -CAkey /opt/rabbitmq/resources/ca.key -CAcreateserial -out /opt/rabbitmq/resources/server.crt -days 365000 && + chmod -R 755 /opt/rabbitmq/resources && + echo -e 'listeners.tcp = none\\nlisteners.ssl.default = 5671\\nssl_options.cacertfile = /opt/rabbitmq/resources/ca.crt\\nssl_options.certfile = /opt/rabbitmq/resources/server.crt\\nssl_options.keyfile = /opt/rabbitmq/resources/server.key\\nssl_options.verify = verify_none' > /etc/rabbitmq/rabbitmq.conf && + /usr/local/bin/docker-entrypoint.sh rabbitmq-server" mem_reservation: 512m cpus: 0.5 From ce68716bf2c1274db465e64990295fd81d0bbdc3 Mon Sep 17 00:00:00 2001 From: Sohit Date: Wed, 8 Jan 2025 16:02:49 +0530 Subject: [PATCH 2/2] use prod base url --- static/artifacts/satellite/proxy-docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/artifacts/satellite/proxy-docker-compose.yml b/static/artifacts/satellite/proxy-docker-compose.yml index 9a8f5680f..fb5127336 100644 --- a/static/artifacts/satellite/proxy-docker-compose.yml +++ b/static/artifacts/satellite/proxy-docker-compose.yml @@ -141,11 +141,11 @@ services: environment: LEVOAI_MODE: docker-compose LEVOAI_LOG_LEVEL: ${LEVOAI_LOG_LEVEL:-INFO} - LEVOAI_IAM_BASE_URL: ${LEVOAI_IAM_BASE_URL:-https://api.dev.levo.ai} + LEVOAI_IAM_BASE_URL: ${LEVOAI_IAM_BASE_URL:-https://api.levo.ai} LEVOAI_CONF_OVERRIDES: > { "onprem-api": { - "url": "${LEVOAI_BASE_URL:-https://api.dev.levo.ai}", + "url": "${LEVOAI_BASE_URL:-https://api.levo.ai}", "refresh-token": "${LEVOAI_AUTH_KEY}", "org-id": "${LEVOAI_ORG_ID:-}", "org-prefix": "${LEVOAI_ORG_PREFIX:-}"