unable to find "application" callable in file /app/main.py #682

Open
opened 2026-03-07 21:21:41 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @hzlnutspread on GitHub (May 6, 2023).

I am trying to run my flask backend through a dockercompose file.

backend: build: context: backend container_name: backend restart: always depends_on: - postgres ports: - 5005:80

The dockerfile itself looks like this:

FROM tiangolo/uwsgi-nginx:python3.11 ENV TZ=Pacific/Auckland ENV PYTHONUNBUFFERED=1 WORKDIR /app COPY . . RUN pip install -r requirements.txt

I am getting the error:

backend | *** Operational MODE: preforking *** backend | unable to find "application" callable in file /app/main.py backend | unable to load app 0 (mountpoint='') (callable not found or import error) backend | *** no app loaded. GAME OVER *** backend | 2023-05-06 19:09:08,044 INFO success: quit_on_failure entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) backend | 2023-05-06 19:09:08,045 INFO exited: uwsgi (exit status 22; not expected) backend | 2023-05-06 19:09:09,046 WARN received SIGTERM indicating exit request backend | 2023-05-06 19:09:09,046 INFO waiting for quit_on_failure, nginx to die backend | 2023-05-06 19:09:10,151 INFO stopped: nginx (exit status 0) backend | 2023-05-06 19:09:10,151 INFO stopped: quit_on_failure (terminated by SIGTERM) backend exited with code 0

I've been stuck on this for a while, does anyone have any suggestions?

Originally created by @hzlnutspread on GitHub (May 6, 2023). I am trying to run my flask backend through a dockercompose file. ` backend: build: context: backend container_name: backend restart: always depends_on: - postgres ports: - 5005:80` The dockerfile itself looks like this: `FROM tiangolo/uwsgi-nginx:python3.11 ENV TZ=Pacific/Auckland ENV PYTHONUNBUFFERED=1 WORKDIR /app COPY . . RUN pip install -r requirements.txt` I am getting the error: `backend | *** Operational MODE: preforking *** backend | unable to find "application" callable in file /app/main.py backend | unable to load app 0 (mountpoint='') (callable not found or import error) backend | *** no app loaded. GAME OVER *** backend | 2023-05-06 19:09:08,044 INFO success: quit_on_failure entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) backend | 2023-05-06 19:09:08,045 INFO exited: uwsgi (exit status 22; not expected) backend | 2023-05-06 19:09:09,046 WARN received SIGTERM indicating exit request backend | 2023-05-06 19:09:09,046 INFO waiting for quit_on_failure, nginx to die backend | 2023-05-06 19:09:10,151 INFO stopped: nginx (exit status 0) backend | 2023-05-06 19:09:10,151 INFO stopped: quit_on_failure (terminated by SIGTERM) backend exited with code 0` I've been stuck on this for a while, does anyone have any suggestions?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-compose#682