You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm using gem 'google-cloud-run-client' for creating services. below is my code
::Google::Cloud::Run::V2::Services::Client.configure do |config|
config.timeout = 50.0
end
client = Google::Cloud::Run::V2::Services::Client.new
request = Google::Cloud::Run::V2::CreateServiceRequest.new(
parent: "projects/bot-up-2021/locations/us-central1",
service: {
template: {
containers: [{
image: "us-central1-docker.pkg.dev/dev-setup:latest",
env: [
{
name: "INTERVIEW_QUESTIONS",
value: application.questions
},
{
name: "INTERVIEWEE_PROFILE",
value: application.interviewee_profile
},
{
name: "INTERVIEW_CONTEXT",
value: application.interview_context
},
{
name: "AI_MODEL",
value: application&.gpt_model&.name
},
{
name: "OPENAI_ORGANIZATION_ID",
value: "org-dsfh342hhj23423h4hj2h"
},
{
name: "OPENAI_API_KEY",
value: "sk-proj-xjfwerlwehhfsdjfkljdklfjlksjld"
}
]
},]
}
},
service_id: application.slug,
validate_only: false
)
# Call the create_service method.
result = client.create_service request
result.wait_until_done!
if result.response?
result.response.name.split('/').last
p result.response
else
puts "No response received."
end
rescue Exception => e
binding.pry
end
in local environment i am setting like export GOOGLE_APPLICATION_CREDENTIALS="/home/lap-053/rails/interviewManagementSystem/interviewbot-2023-7a0ec8bff648.json". but i can't do it in production.
Questions
what will be solution for it to set "GOOGLE_APPLICATION_CREDENTIALS" in production mode when deploy it on google cloud run?
i want also set "CreateServiceRequest" as public not private, so it should not authenticate. how i can set parameters for it?
Kindly help.
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
i'm using gem 'google-cloud-run-client' for creating services. below is my code
in local environment i am setting like export GOOGLE_APPLICATION_CREDENTIALS="/home/lap-053/rails/interviewManagementSystem/interviewbot-2023-7a0ec8bff648.json". but i can't do it in production.
Questions
Kindly help.
Thanks
The text was updated successfully, but these errors were encountered: