How to ignore directories when running Django collectstatic?

I am running a small test project with Django 1.3, Ubuntu 11.10, gunicorn and Nginx, everything in a virtualenv, and now I'm running collectstatic to get my static files into the directory that...

Debugging a Flask app running in Gunicorn

I've been working on a new dev platform using nginx/gunicorn and Flask for my application. Ops-wise, everything works fine - the issue I'm having is with debugging the Flask layer. When there's an...

Sharing static global data among processes in a Gunicorn / Flask app

I have a Flask app running under Gunicorn, using the sync worker type with 20 worker processes. The app reads a lot of data on startup, which takes time and uses memory. Worse, each process...

Uploaded videos are not playing in mobile browser but are playing on desktop broswer

I have set up a server (gunicorn and nginx) to upload videos using Python/Django, and watch them in the browser. The video player I am using is videojs. All the videos are h.264 mp4. And the video...

How does one use the VSCode debugger to debug a Gunicorn worker process?

I have a GUnicorn/Falcon web service written in Python 3.4 on Ubuntu 14.04. I'd like to use the VSCode debugger to debug this service. I currently start the process with the...

Django and nginx with docker compose - static files are not loaded

I know that several similar questions have been asked, but I have not managed to find a proper answer anywhere. I want to dockerize my Django app. The app works fine in the docker container but...

Where is the Postgres username/password being created in this Dockerfile?

So I was following this tutorial: https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/ I have everything up and running, however theres a few things going on that...

H14 error in heroku - "no web processes running"

error H14 happen while deploying to heroku this is my procfile: web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app log on heroku: 2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error...

django- nginx: [emerg] open() "/etc/nginx/proxy_params" failed (2: No such file or directory) in /etc/nginx/sites-enabled/myproject:11

I try to deploy a django project with Nginx and Gunicorn with this tutorial. i did all to-dos but, when i create /etc/nginx/sites-available/myproject file with below code: server { listen...

Airflow: Can't connect to ('0.0.0.0', 8080)

I am on Ubuntu 16.04,I have installed Airflow with pip. Next step airflow initdb [2017-07-29 12:20:23,483] {__init__.py:57} INFO - Using executor SequentialExecutor DB:...

MongoClient opened before fork. Create MongoClient

When I start some of my services, it reports such warnings and the services stop: /usr/lib64/python2.6/site-packages/pymongo/topology.py:75: UserWarning: MongoClient opened before fork. Create...

Restart task if is already running

i have this task that is server for my application: "tasks": [ { "label": "f1", "type": "shell", "command": "gunicorn", "args": [ "main:api" ...

docker ERROR: for nginx Cannot start service nginx: driver failed programming external connectivity on

I'm new to Docker and setting up my first Django application using Docker my application path looks like app |- helloworld |- __init__.py |- manage.py |- static_cdn |- static_root ...

(upstream prematurely closed connection while reading response header from upstream) ..... && 502 bad gateway

I am getting this error log in /var/log/nginx. When I run the site I get a 502 bad gateway after exactly 30 seconds of loading up. If i remove some (time extensive) lines of code everything works...

Dockerizing Django application: ModuleNotFoundError: No module named 'X"

I've been trying to follow this guide to Dockerize a project: Deploy and Run Django in Dokcer Container This is the base file structure: WFMBCM |-WFMBCM | |-__init__.py | |-__pycache__ |...

Django 'pip install django-heroku'(psycopg2) error is blocking deployment to Heroku

I am setting up a new Django project to deploy on Heroku, however when I am following the Django Heroku deployment guide I come across an error during 'pip install django-heroku'. I am running on:...

Gunicorn is failing with OSError: [Errno 107] Transport endpoint is not connected

I was facing this issue while running my application [Docker Image] with the gunicorn version 19.9.0 in Openshift. I'm not using the nginx to set...

gunicorn daemon (active: failed) / curl(56) Recv Failure: Connection reset by peer

First thing, I am not sure if this is better here or on ask ubuntu (ubuntu did not have a 'gunicorn' tag so I think i'm in the right place). If it is not appropriate here just drop it in the...

No matching distribution found for torch==1.5.0+cpu on Heroku

I am trying to deploy my Django app which uses a machine learning model. And the machine learning model requires pytorch to execute. When i am trying to deploy it is giving me this error ERROR:...

AWS sagemaker error - AttributeError: 'NoneType' object has no attribute 'startswith'

As per this - https://stackoverflow.com/questions/56255154/how-to-use-a-pretrained-model-from-s3-to-predict-some-data , I was trying to use an existing model to create an endpoint, but I was...

Error: '' is not a valid port number while trying to bring up Python flask application on GKE

I am trying to bring up a python flask application using gunicorn. I am referring to this code to create an image and then bring up a pod/deployment/service on GKE. Pod bring up fails on GKE with...

Dash apps with basic_scaling/manual_scaling on Google App Engine

I had my Dash app working perfectly fine with GAE on automatic scaling types. My app.yaml was simply: runtime: python38 instance_class: F4_1G entrypoint: gunicorn --timeout 2400 -b :$PORT...

Crontab with flask command on Azure App Service with Linux ASP

What I'm trying to do is to run flask command in crontab on Azure App Service with linux App Service Plan. So far I have my startup.sh to setup cron but the command does not execute, nothing in...

Unable to install pip azure-cognitiveservices-speech within a docker container

Original Issue I'm unable to install azure-cognitiveservices-speech within a docker container using pip. My container is running fine and is able to install all other packages (django,...

redirect http to https with nginx: gives to http 'This site can’t be reached'

I have a flask app running with gunicorn and nginx. https works normally. I really strangle to find a way to redirect http to https though. I have tried multiple solutions on internet but non...

heroku showing There's nothing here, yet even though app is deployed and worked properly

I have used heroku for 2 months now. Deployed one app, everything worked fine. I actually already finished app development 2 days ago. Everything worked fine also yesterday. Suddenly today I...

Unable to connect to airflow webserver [ERROR] Can't connect to ('0.0.0.0', 8080)

Hi I am trying to connect airflow server through python but I am unable to connect. pip install apache-airflow==2.0.2 !airflow db init Now I am trying to connect to airflow server but I am...

Recieving Server Error (500) when deploying Django app to Heroku

I've been struggling for days just trying to deploy my site to Heroku. I've referenced many other Stack Overflow questions about this topic, such as: Django Heroku Server Error (500) when I set...

FastAPI with nginx does not serve static files in HTTPS

I have a small, test FastAPI web application that is serving a simple HTML page that requires a css style sheet located in the static folder. It is installed on a Linode server (Ubuntu 20.04...

How to run FastAPI app on multiple ports?

I have a FastAPI application that I am running on port 30000 using Uvicorn programmatically. Now I want to run the same application on port 8443 too. The same application needs to run on both...