Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

407
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda