Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

416
Vistas
tiangolo/uwsgi-nginx-flask directory structure

What would be the directory structure required to successfully run a flask app inside a container using the base image tiangolo/uwsgi-nginx-flask.

The website mention only the location of the file main.py.

enter image description here

For more advance project

enter image description here

Where are we suppose to locate the folders 'Templates' and "Static' ?

Thanks a lot for your help.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

.
├── Dockerfile
└── app
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   ├── static
    │   │   ├── script.js
    │   │   └── style.css
    │   └── templates
    │       └── index.html
    └── uwsgi.ini

4 directories, 7 files

You can locate templates & static wherever you like, however Flask will automatically know how to locate them if they are placed at the same path level as your app object creation script. If you decide to place them somewhere else, you may pass in static_folder and template_folder as keyword arguments with the absolute paths to these folders. If you want to see more details about the way in which Flask loads these files, you can set the EXPLAIN_TEMPLATE_LOADING config value to True (it defaults to False)

from flask import Flask
app = Flask(__name__)
app.config.update(EXPLAIN_TEMPLATE_LOADING=True)

This will log the output from the Jinja2 template loading engine, which is what Flask is using behind the scenes to locate its static files.

You find more details about advanced Flask patterns from the official documentation.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda