Does Heroku require a SSL certificate to execute cloud code that queries or uses the MongoAtlas DB? I can't post to my cloud functions - parse-platform

I have a Parse Server on Heroku with a Atlas DB. I can't get cloud code that does database operations to work. I have read every question about my error, tried numerous configs.After build I get a can't connect to https://someappname.heroku.com cloud code and push might not be available. Is this a build error, Heroku platform error, or something else? The cloud functions work when they just return a response or serve a page.
If I have a cloud function that queries something, I get a can not post to parse/classes/foo. error and I am out of ideas.

Related

How to deploy Laravel 8 google cloud run with google cloud database

Iam looking for help to containerize a laravel application with docker, running it locally and make it deployable to gcloud Run, connected to a gcloud database.
My application is an API, build with laravel, and so far i have just used the docker-compose/sail package, that comes with laravel 8, in the development.
Here is what i want to achieve:
Laravel app running on gcloud Run.
Database in gcloud, Mysql, PostgreSQL or SQL server. (prefer Mysql).
Enviroment stored in gcloud.
My problem is can find any info if or how to use/rewrite the docker-composer file i laravel 8, create a Dockerfile or cloudbuild file, and build it for gcloud.
Maybe i could add something like this in a cloudbuild.yml file:
#cloudbuild.yml
steps:
# running docker-compose
- name: 'docker/compose:1.26.2'
args: ['up', '-d']
Any help/guidanceis is appreciated.
As mentioned in the comments to this question you can check this video that explains how you can use docker-composer, laravel to deploy an app to Cloud Run with a step-by-step tutorial.
As per database connection to said app, the Connecting from Cloud Run (fully managed) to Cloud SQL documentation is quite complete on that matter and for secret management I found this article that explains how to implement secret manager into Cloud Run.
I know this answer is basically just links to the documentation and articles, but I believe all the information you need to implement your app into Cloud Run is in those.

How do I access Heroku Postgres DB from an external application using latest credentials?

I am building an ETL Application that needs to fetch data from Heroku Postgres DB a few times a day but the application is not running on Heroku, I am already able to do this, but using the current credentials, but heroku states that the credentials are not permanent and will be rotated from time to time.
What is the best way to do this, building a REST API on top of my app is not viable an option. I have seen that Heroku provides a config vars API which I could potentially use to fetch the DB credentials, but is there a simpler/cleaner way for implementing this, is enforcing permanent credentials an option?
There is no way to enforce it. And it's not a question of credentials, but a question of a database hostname. It's ec2.
Your safest bet is to always fetch current DATABASE_URL from your Heroku app. If you only need to do it 'a few times a day' this is not a problem.

graphiql UI is broken for Serverless/AWS-Lambda setup

Here's a reference setup of AWS Lambda and Serverless and GraphQL that i'm following:
https://github.com/serverless/serverless-graphql-apollo
I'm trying with yarn run start-server-lambda:offline to start the project offline, it does start without any problems, but upon navigating to /graphiql, I get this:
There's a configuration problem somewhere.
Basically, it's sending a request to /production/graphql when it should have been sending it to /graphql.

Deploying to Parse.com hosting from continous Integration

Does anyone know if it's possible to deploy to Parse.com hosting from CloudBees, Travis, or circle?
I'm aware of the commandline tool but I'm not sure how to integrate it with CI or if there is any other way.
I've found a solution that have worked well for me. Using travis-ci.com you can set it up to work with parse.com and github. Users commit to master branch and the code is auto deployed to Parse.com. Basically your credentials are encrypted using Travis's Ruby script (which can be found here: http://docs.travis-ci.com/user/encryption-keys/ . Once you're keys are made, you setup a .yml config file that, on travis downloads the parse sdk in a virtual environment, uses the hashed credentials to login to parse and then runs the parse deploy function resulting in a push to parse.

How configure a shared database with Play/Heroku?

I started by defining a framework ID as specified here
http://www.playframework.org/documentation/1.2/guide11
I called my server appnameheroku
Then I retrieved the database URL using
heroku config
from the console
I then added the following two lines to application.conf
%appnameheroku.jpa.ddl=validate
appnameheroku.db=postgres://....compute-1.amazonaws.com/etc
I then deploy the app and get the following error
Oops, an error occured
This exception has been logged with id 6963iilc8. I'm using the free version of Heroku.
Two things here: Storing config in the application code is a bad idea, as it prevents Heroku from carrying out a lot of administrative tasks on your behalf.
Therefore I would configure my application.conf as:
db=${DATABASE_URL}
jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
jpa.ddl=update
Heroku don’t recommend setting jpa.ddl to update for a real world production app. Use Play!’s database evolutions instead.

Resources