Questions tagged [flask]

143 questions
7
votes
2 answers

Apache 2.4 authenticate anonymous users but allow others by IP

I am trying to configure Apache to allow users from a selection of IPs access to a Flask application without authentication, but to challenge any other users for credentials. As things stand I have the following configuration:
7
votes
1 answer

In airflow's configuration file `airflow.cfg` what is the `secret_key`, and do I have to set it?

As a comment above the value, it says # Secret key used to run your flask app, but that doesn't tell me much. Currently it is set to secret_key = temporary_key, but that seems unsafe. We have set up password protection on the webservice, and it is…
7
votes
3 answers

Nginx cannot see unix socket

UPDATE: I saw questions related to the /tmp directory, and a comment mentioned moving the socket out of /home as well. It didn't fix the problem. (Additional updates at bottom of post) I have a ubuntu 16.04 vm on azure I'm using to host a flask…
Ajacmac
  • 116
5
votes
1 answer

nginx + uwsgi - what is serving static files?

I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app. server { listen 80; server_name test.myapp.com www.test.myapp.com; charset utf-8; …
3
votes
1 answer

failed (111: Connection refused) while connecting to upstream python

I am experiencing 502 Bad Gateway errors after deploying a python flask application using dokku on digital ocean. I followed this tutorial to deploy my app on digital ocean using dokku. 2018/10/23 07:40:59 [error] 28652#28652: *1 connect() failed…
Deschant Kounou
  • 31
  • 1
  • 1
  • 3
3
votes
1 answer

Nginx change links to 127.0.0.1

I have a flask app running in a docker container, and I configured nginx to redirect all requests to this container. Here's my nginx config: server { listen 80; location / { proxy_pass http://127.0.0.1:5000; proxy_redirect off; …
3
votes
3 answers

Nginx uWSGI responses truncated

I tried to write a web service as a joke today at http://dont-tread-on-memes.controversial.io. It's a flask app that serves fairly large images. The Flask app works well on its own, as does an independent uWSGI server, but when I try to plug uWSGI…
3
votes
1 answer

Docker, docker-compose application settings

I'm starting to migrate my Application to Docker containers: I use Ngnix, supervisord, gunicorn, python flask, celery, flower, lighttpd, RabbitMQ and Postgresql. In my original virtual machine, I keep all my configurations…
gogasca
  • 353
3
votes
1 answer

Python background task thread lock error with mod_wsgi

I have a small python web application built on the Flask framework and deployed with mod_wsgi to apache. The application is scheduling a background task with apscheduler that runs every couple of minutes. From the error log of apache I have been…
totokaka
  • 202
  • 2
  • 8
3
votes
3 answers

Uwsgi and flask with unix socket instead of URL

I was trying to find out the difference between a socket as a unix file and a socket that is a ip and port. If I switch something like uwsgi to use a file instead of a port and ip, how do I then access uwsgi as a URL in my browser, since no port is…
J.Zil
  • 1,153
3
votes
0 answers

Nginx + uWSGI + Flask Connection Reset

Problem I have a Flask app deployed using Elastic Beanstalk's "Single Container Docker" platform (latest revision 3.2.5 at the time of writing), with an "Application Load Balancer" in front of it. I had this same Flask app deployed in EB with the…
jlucier
  • 131
2
votes
1 answer

Flask to uwsgi threading get stuck

im Using Python 3.7.3, uwsgi 2.0.18, (docker container image python:3-stretch) We have development environment where we are running our code on flask and we change it to uwsgi when we test it on production. Im running a py script which get…
2
votes
0 answers

Systemd Unit file for uWSGI Failure

Using Flask, NGINX, and uWSGI I have setup successfully setup an app that I send and receive text messages through Twilio. Everything is working perfect, except that it is running under my personal user account (named trinitrogen). I'd like to move…
2
votes
1 answer

Can not start a Docker container

I Built an image using flask, nginx and uwsgi. FROM ubuntu:14.04 MAINTAINER Ali Mezgani RUN apt-get update && apt-get -y install python python-dev python-pip RUN apt-get -y install supervisor RUN apt-get -y install …
Ali Mezgani
  • 3,870
2
votes
1 answer

NGINX + uWSGI + Flask. Some requests very slow

We're running a fairly large Flask application and finding that at random times we'll end up with a very slow request (sometimes a minute or more) I presume the issue is related to lazy-loading modules and slow requests are when a new worker needs…
Cfreak
  • 135
1
2 3
9 10