gcloud app deploy can't find classmap paths - google-app-engine

I'm trying to deploy an application to Google App Engine which uses Propel ORM libraries. It works fine in local tests, but google App Engine deployment isn't working. It keeps failing and outputs this message:
[RuntimeException]
Could not scan for classes inside "vendor/bin/orm/orm" which does not appear to be a file nor a folder
This is my composer.json contents:
{
"autoload": {
"psr-4": { "": ""},
"classmap": [
"vendor/bin/orm/orm"
]
},
"require": {
"propel/propel": "~2.0#dev",
"google/cloud": "^0.32.1",
"php": "5.6.*|7.0.*|7.1.*"
},
"require-dev": {
"behat/mink": "^1.7",
"behat/mink-goutte-driver": "^1.2",
"phpunit/phpunit": "~4",
"symfony/browser-kit": "^3.0",
"symfony/http-kernel": "^3.0",
"google/cloud-tools": "^0.6"
}
}
As I said it works locally... If I remove the classmap configuration, the application deploys with no failures.

Got this answer from Google Groups:
Hi, 'vendor/bin/orm/orm' is not a Propel internal path. You need it
only if you've saved your generated model classes into that directory.
If your model classes are in another folder (reachable via psr-4
autoload) you can safely remove the 'classmap' instruction. otherwise,
you should create manually this directory on gcloud.
Just changed the autoload class map to PSR-4 as follows:
"autoload": {
"psr-4": { "orm\\orm\\": "vendor/bin/orm/orm"}
}
And it works. Hope this helps someone with the same issues.

Related

Challenges with Production Build

Step 1
sencha -sdk C:/Users/lperepol/Downloads/SenchaEnterpriseExtJS/Unzip_7.xx/ext-7.3.1/ext-7.3.1 generate app -ext CDW ./CDW
Step 2
sencha app build
Then move the production folder to Web Server. App displays fine.
Step 3
Add a chart.
sencha app watch -- Chart displays fine.
Step 4
sencha app build
Then move the production folder to Web Server. App does not display web server error.
How do I get charts to display on a production web server? In development, everything works but not when moved to a Web Server.
Thank you for the response that led me in the right direction! Adding items to the requires array in the chart view solved the issue. The charts are displaying now on a remote web server --> CDW
requires: [
'Ext.chart.CartesianChart',
'Ext.chart.axis.Category3D',
'Ext.chart.axis.Numeric3D',
'Ext.chart.grid.HorizontalGrid3D',
'Ext.chart.grid.VerticalGrid3D'
'Ext.chart.interactions.ItemHighlight',
'Ext.chart.interactions.PanZoom',
'Ext.chart.series.Bar3D',
'Ext.chart.series.Line',
'Ext.chart.theme.*',
'Ext.draw.modifier.Highlight',
],
make sure in your app.json you have:
Charts in the requires section.
"requires": [
"exporter#7.3.1",
"calendar#7.3.1",
"charts#7.3.1",
"font-awesome"
],
a manifest defined in the bootstrap property.
The bootstrap section should be there but you may have to add the manifest property.
"bootstrap": {
"base": "${app.dir}",
"manifest": {
"path": "bootstrap.json",
"exclude": ""
},
"microloader": "bootstrap.js",
"css": "bootstrap.css"
},

EXTJS 6 app in .war deployed on jetty, behind proxy

I have EXTJS 6 app packed in web app (.war) deployed on jetty server behind apache proxy
Proxy is configured to proxy requests to my jetty node server
example:
https://my.domain/sencha << internet addess
is proxied to internal jetty server
http://jetty-node-1/my-sencha-webbapp << node address
Problem:
I don't know where to set /sencha uri in my extjs app as base path so that everything is loaded relatively from /sencha path instead of / path
Regards
Armando
I've solved it.
In app.json I added this setting
"base": "${app.dir}/sencha/"
Now it knows all about the relative path.
Snippet from app.json:
"production": {
"output": {
"appCache": {
"enable": true,
"path": "cache.appcache"
},
"base": "${app.dir}/sencha/"
},
}
please note that this creates sub folder ${app.dir}/sencha in which your production build will be.
Regards
Armando

Firebase deployment (react app) - generates a blank screen

I am trying to deploy my react app to Firebase (using firebase-tools).
The app was generated using this generator (which has deployment instructions in the readme). I followed them, but they didn't flag that Firebase overrides the index html, so they initial step replaced my html in the build file with the Firebase override. I copied my src/index.html back to the build file and re-ran the init, build and deploy calls.
I have an intercom script on the home page - the only part of the page that renders is the intercom icon. The rest of the page is blank.
I have seen this post. Like this user, I had to remove the predeploy script from my firebase.json because it was generating eslint errors.
The facebook create-react-app advice for Firebase hosting is to add an additional script to the firebase.json with:
"headers": [
{"source": "/service-worker.js", "headers": [{"key": "Cache-Control", "value": "no-cache"}]}
],
I also tried this, but it doesn't change anything.
I tried removing, reinstalling npm and then cleaning the cache (in the functions folder). I have noticed that reinstalling node modules does not result in a functions/node_modules/eslint folder. I'm not sure why.
Others have suggested chrome/devtools/application/clear storage/clear site data. I have tried it but nothing changes.
Some posts attribute the problem to firebase-tools - although more recent posts suggest that the error that gave rise to that solution has now been remedied.
Has anyone found a solution for this problem?
In firebase.json - change public from 'build' to 'dist'
"hosting": {
"public": "dist",

Correct way of subdomain configuration [duplicate]

We're using custom domains on firebase hosting: our app, served from index.html, runs nicely on app.example.com. We've also connected www.example.com, which serves the app as well.
The problem is: on www.example.com I want to be able to host a simple static page. Is there a way to configure this in the rewrites? We can easily output an extra html file in the deploy, next to index.html.
Any ideas?
Our firebase.json:
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Firebase Hosting does not support multiple sites in a single project at this time. However, you can create a second project for your static landing page and deploy it there, connecting it to the www domain while leaving the app domain connected to the other project.
As of August of 2018, Firebase Hosting supports multiple sites on a single project! See the docs for more info.

The Facebook Instant Articles module requires the facebook-instant-articles-sdk-php library in Drupal

How about friends, I installed in drupal 7 the module Facebook Instant Articles, but when I activate it it puts me this error: The Facebook Instant Articles module requires the facebook-instant-articles-sdk-php library.
I downloaded the facebook-instant-articles-sdk file from https://github.com/facebook/facebook-instant-articles-sdk-php, I unzip it and upload it to my site in the path: / httpdocs / sites / all / Libraries / facebook-php-sdk / src return to my site to activate the module but still showing "The Facebook Instant Articles module requires the facebook-instant-articles-sdk-php library, and composer autoloading"
Can you tell me if I'm doing bad lake, or should I do anything else?
Thanks for your help.
I Have also installed Drupal 7 with fb_instant_article Module.
In addition, I installed Composer_Manager and XAutoload. And I have installed the SDK via Composer.
htdocs/sites/default/files/composer/composer.json
{
"require": {
"php": ">=5.3.0",
"sensiolabs/security-checker": "~2.0",
"facebook/facebook-instant-articles-sdk-php": "^1.0.0"
},
"config": {
"autoloader-suffix": "ComposerManager",
"vendor-dir": "../../../all/vendor"
},
"prefer-stable": true,
"autoload": {
"psr-4": {
"Drupal\\fb_instant_articles\\": [
"../../../all/modules/fb_instant_articles/src"
],
"Drupal\\fb_instant_articles_display\\": [
"../../../all/modules/fb_instant_articles/modules/fb_instant_articles_display/src"
]
}
}
}

Resources