now getting the correct IPV6 for proxy

This commit is contained in:
JBB0807 2025-05-07 23:30:37 -07:00
parent 7daa2e6cca
commit a494cd4f0a
5 changed files with 18 additions and 4 deletions

View file

@ -1,3 +1,4 @@
DB_ASSIGNMENT_SERVICE_URL = "http://db-assignment-service.internal:3000"
DEPLOY_API_URL="http://localhost:3006"
PROXY_URL="https://proxy-service.fly.dev"
NODE_PORT = 8080

View file

@ -8,4 +8,6 @@ AWS_REGION='auto'
AWS_SECRET_ACCESS_KEY='tsec_6Bz1aMbfYQftuq5WfIVEDZkHwskU4MMjVywdtxSP6uxetEBvkSC2VHI9HfTeDgHr4D6kiz'
COMMON_BUCKET='snakeapi-deployment-test-bucket'
PROXY_URL="https://proxy-service.fly.dev"
NODE_PORT=8082

View file

@ -1,4 +1,5 @@
NODE_ENV=docker
DB_ASSIGNMENT_SERVICE_URL="http://js-assignment-db-service:3200"
DEPLOY_API_URL="http://js-deployment-service:3006/deploy"
NODE_PORT=8082
NODE_PORT=8082
PROXY_URL="https://proxy-service.fly.dev"

View file

@ -8,6 +8,7 @@ const DB_ASSIGNMENT_SERVICE_URL =
process.env.DB_ASSIGNMENT_SERVICE_URL || "http://localhost:3000";
const DEPLOY_API_URL = process.env.DEPLOY_API_URL || "http://localhost:3600";
const PROXY_URL = process.env.PROXY_URL;
console.log("DB_ASSIGNMENT_SERVICE_URL:", DB_ASSIGNMENT_SERVICE_URL);
console.log("DEPLOY_API_URL:", DEPLOY_API_URL);
@ -63,8 +64,9 @@ intructorRouter.post(
// Update the assignment with the deployment details
const updatedAssignmentData = {
assignmenturl: ipv6,
assignmenturl: `${PROXY_URL}/${ipv6}`,
}
console.log("Updating assignment with deployment details:", updatedAssignmentData);
const updateRespone = await axios.put(
`${DB_ASSIGNMENT_SERVICE_URL}/assignments/${assignmentId}`,