swisscomdev

CloudFoundry: nginx for serving static content on top of Gunicorn (Docker)

给你一囗甜甜゛ 提交于 2021-02-10 20:52:24
问题 I am currently running a Gunicorn server in a Docker container serving both a Flask application and static content (on Swisscom CloudFoundry). What is the correct way to set up nginx as a reverse proxy for serving the static content? I assume the Staticfile buildpack is not the way to go? Could someone point me in the right direction? 回答1: If you're using Cloud Foundry, it's super easy to spin up an extra instance or two to scale your app up and handle more load. I would recommend doing this

CloudFoundry: nginx for serving static content on top of Gunicorn (Docker)

冷暖自知 提交于 2021-02-10 20:51:47
问题 I am currently running a Gunicorn server in a Docker container serving both a Flask application and static content (on Swisscom CloudFoundry). What is the correct way to set up nginx as a reverse proxy for serving the static content? I assume the Staticfile buildpack is not the way to go? Could someone point me in the right direction? 回答1: If you're using Cloud Foundry, it's super easy to spin up an extra instance or two to scale your app up and handle more load. I would recommend doing this

CloudFoundry: nginx for serving static content on top of Gunicorn (Docker)

梦想与她 提交于 2021-02-10 20:51:24
问题 I am currently running a Gunicorn server in a Docker container serving both a Flask application and static content (on Swisscom CloudFoundry). What is the correct way to set up nginx as a reverse proxy for serving the static content? I assume the Staticfile buildpack is not the way to go? Could someone point me in the right direction? 回答1: If you're using Cloud Foundry, it's super easy to spin up an extra instance or two to scale your app up and handle more load. I would recommend doing this

Push state enabled & context path routing: Static assets are not found on the server

戏子无情 提交于 2021-01-27 13:55:22
问题 I deployed a react app to cloud foundry by using the static buildpack. The goal is making the app accessible under domain.com/ path . So I configured the route accordingly to his blog post: https://www.cloudfoundry.org/context-path-routing/ Also, I set pushstate: enabled in the static file and added the context path to the static asset URLS; E.g. The URL for the style sheet is domain.com/path/static/style.css . When I visit domain.com/path I get the index.html file. However the static assets

why does cloudfoundry ssh drop the connection after 24 minutes?

依然范特西╮ 提交于 2020-01-15 09:14:51
问题 We use the cf ssh command to open a tunnel so we can access the MariaDB from our jenkins job. cf ssh -N -L 13000:10.0.20.18:3306 hostapp & As soon as the tunnel is open, we have [liquibase][http://www.liquibase.org] connect to the DB to update the schema. This works fine so far, but some of the DDL scripts and dataloads do take a long time and unfortunate it seems that the cf ssh tunnel is only open for about 24 minutes and then the connection is dropped. Is there any way to extend this time?

Swisscom Cloud SSL certificate

时间秒杀一切 提交于 2020-01-11 13:54:07
问题 We're rolling out some simple static web sites onto the Swisscom CloudFoundry cloud, and want to enable SSL for the sites. Our product manager is not happy with the scapp.io or applicationweb.io names, and we want to be able to add SSL certificates for our domain, e.g "www.swisscom.io". How do achieve this, given the fact that we're users and not administrators and don't have access to the "Operations Manager" tool? This question is specifically about the Certificate: The setting up of the

Cannot run Cloudfoundry Task - Unexpected Response 404

北慕城南 提交于 2019-12-29 08:36:26
问题 After my app is successfully pushed via cf I usually need do manually ssh-log into the container and execute a couple of PHP scripts to clear and warmup my cache, potentially execute some DB schema updates etc. Today I found out about Cloudfoundry Tasks which seems to offer a pretty way to do exactly this kind of things and I wanted to test it whether I can integrate it into my build&deploy script. So used cf login, got successfully connected to the right org and space, app has been pushed

Swisscom Application Cloud: External File System (Volume Services)

痴心易碎 提交于 2019-12-24 12:04:58
问题 Is it possible to use External File System (Volume Services) on Swisscom Application Cloud? 回答1: At the moment not. It's not planed yet but definitely on the radar. The App Cloud squats had a internal Hackathon and made a PoC of Volume Services (with NetApp). 来源: https://stackoverflow.com/questions/48458936/swisscom-application-cloud-external-file-system-volume-services

How to serve user-uploaded files on Swisscom Application Cloud?

痞子三分冷 提交于 2019-12-23 22:52:06
问题 As applications shouldn't write files to the local file system it makes sense to store user-uploaded files in the Dynamic Storage provided by Swisscom. The Dynamic Storage service is similar to Amazon S3 where you would usually make the bucket with the user-uploaded files publicly readable with a bucket policy. However how would I serve user-uploaded files from the Dynamic Storage as the "Put Bucket policy" is an unsupported operation? 回答1: You are correct, dynamic storage of Swisscom does

Database connection refused with Symfony / PHP

*爱你&永不变心* 提交于 2019-12-12 19:50:46
问题 Trying to deploy a Symfony 3.2/Doctrine application to Swisscom PaaS. Buildpack (PHP 7, httpd etc.) are installed, composer is running and installing dependencies, but when calling the composer after-commands, like cache:clear I get an: [Doctrine\DBAL\Exception\ConnectionException] An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused my manifest.yml : applications: - services: - dbservice buildpack: php_buildpack host: myapp name: MyApp instances: 1 memory: 640M env: