Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
How to reload __init__ files in FastApi every 5 minutes using the docker --reload?

I'm trying to use the parameter --reload in my dockerfile to reload files inside the init function every 5 minutes in my FastAPI code, but i cannot seem to achieve that. Someone knows what i'm doing wrong?

version: "3.9"

services:
  people:
    container_name: people
    build: .
    working_dir: /code/app
    command: uvicorn main:app --host 0.0.0.0 --reload
    environment:
      DEBUG: 1
    volumes:
      - ./app:/code/app
    ports:
      - 8008:8000
    restart: on-failure

And the init code:

class Files:
    def __init__(self):
       df = # here i will load file from an azure bucket...

Also, i don't want to restart the whole container and rebuild it, but just reload the file.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!