staticfile-buildpack | Deploy static HTML/JS/CSS apps to Cloud Foundry | Web Site library
kandi X-RAY | staticfile-buildpack Summary
kandi X-RAY | staticfile-buildpack Summary
A Cloud Foundry buildpack for static content such as websites (HTML/JS/CSS).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of staticfile-buildpack
staticfile-buildpack Key Features
staticfile-buildpack Examples and Code Snippets
Community Discussions
Trending Discussions on staticfile-buildpack
QUESTION
I'm trying to deploy my Angular (6) application on CloudFoundry. I want to map my app on a route like http://myapp.domain.com/mycontextpath , so WITH A PATH. To do so, I deploy my app (CF PUSH) using a yml file like:
...ANSWER
Answered 2018-Aug-01 at 10:35In fact I solve my issue by adding an extra mycontextpath root directory to the dist.zip file that I push to Cloud Foundry.
To do so with Angular 6, you can update angular.json file with:
QUESTION
I am currently trying to deploy a built React app to Cloud Foundry. The React is nothing special and packages into a set of static files with no issues. However, when I try and deploy to CF, I get the follow error:
...ANSWER
Answered 2019-Jul-09 at 16:54Thanks to Daniel Mikusa up above, I was able to solve this. I had originally deployed to this specifically named service on Cloud Foundry as a Node project with the Node buildpack before changing my workflow to use the Staticfile buildpack on the same container. I believe what has happened is since the Node buildpack sets a start command, it remained cached on the container and since the Staticfile buildpack didn't override it, it remained. Even when I deleted and deployed to the same name service, the start command persisted. I did exactly what Daniel said to do (newly named service, change my manifest to simply use -staticfile_buildpack
rather than any git link) and have no issues.
QUESTION
I am trying to create a generic nginx.conf
that does a proxy_pass
depending on the environment.
I am using fixture from cloud foundry staticfile-buildpack
https://github.com/cloudfoundry/staticfile-buildpack/tree/master/fixtures/pushstate_and_proxy_pass/
I want to set a proxy pass depending on the environment variable.
This is the code of the proxy.conf:
location /api { proxy_pass {{env "MY_DEV_PROXY"}}; }
I expect that MY_DEV_PROXY environment variable that I have previously set is resolved.
Instead, when pushing my app to cloud foundry I get:
ERR 2019/02/19 08:18:39 [emerg] 88#0: directive "proxy_pass" is not terminated by ";" in /home/vcap/app/nginx/conf/includes/proxy.conf:1
When using a direct value instead of a variable:
location /api { proxy_pass https://my-dev-proxy.com; }
everything works fine.
cf curl /v2/info && cf version:
{
"description": "Cloud Foundry provided by Swisscom",
"min_cli_version": "6.42.0",
"min_recommended_cli_version": "latest",
"api_version": "2.128.0",
"osbapi_version": "2.14",
}
cf version 6.42.0+0cba12168.2019-01-10
ANSWER
Answered 2019-Mar-02 at 02:57If you're using the Nginx buildpack, you can use the method in the docs for accessing environment variables.
QUESTION
I'm trying to deploy Angular 6 application to PCF using "cf push -f manifest.yml
" command.
Deployment works fine, except its not considering options set in "Staticfiles" .
To be specific, I've below values in Staticfile
, to force HTTPS, and to include ".well-known" folder which will be excluded by default due to "." prefix.
ANSWER
Answered 2018-Aug-02 at 19:55First..
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
Don't do this. You don't want to point to the master branch of a buildpack, it could be unstable. Point to a release, like https://github.com/cloudfoundry/staticfile-buildpack.git#v1.4.31
or use the system provided staticfile buildpack, like staticfile_buildpack
.
To be specific, I've below values in Staticfiles
It's not Staticfiles
, plural. It's Staticfile
singular. Make sure you have the correct file name & that it's in the root of your project (i.e. same directory that you're pushing), which is ./dist
based on path:
in your manifest.
Update: For angular, "Staticfile" should be under "src" folder, which will put it under dist on building.
https://docs.cloudfoundry.org/buildpacks/staticfile/index.html#config-process
QUESTION
I have tried several attempt to upload app to IBM Cloud using
...ANSWER
Answered 2018-May-04 at 01:00Please try this:
- Add a “manifest.yml” file with:
applications:
name: my-app-name
buildpack: staticfile_buildpack
host: my-app-name
memory: 32M
path: dist
- Run “ng build” to create “dist” folder
- Take “/dist” out of gitignore file if it exists
QUESTION
I'm trying to setup prerender.io with cloud foundry staticfile buildpack (https://github.com/cloudfoundry/staticfile-buildpack), but I can't get it to serve files correctly.
I couldn't find the default nginx.conf that staticfile uses as default. I'm using (https://github.com/cloudfoundry/staticfile-buildpack/blob/master/cf_spec/fixtures/reverse_proxy/nginx.conf) as a reference, but it does not seem to be the right one.
The nginx.conf below is partially working. For some reason, css is being loaded, however they are not being rendered. Just browser default styles are displayed.
A online preview of the server can be accessed at http://cabemcasa-front-staging-dev.mybluemix.net/
...ANSWER
Answered 2017-May-02 at 20:16I have done something similar in another project. Try this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install staticfile-buildpack
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page