Skip to content

backend does not start, even after changing line endings from CRLF to LF manually #248

Closed

Description

@pranjalsrv

This is in the output of command docker-compose logs:

backend_1  | There is no script /app/prestart.sh
backend_1  | INFO:     Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
backend_1  | INFO:     Started reloader process [1] using statreload
backend_1  | ERROR:    Error loading ASGI app. Import string ":app" must be in format "<module>:<attribute>".

This issue still persists on running on Windows. It is the duplicate of closed issue #90, merged by PR #149
I tried changing the line endings using both VSCode and manually using the command:find . -type f -exec dos2unix {} \;, but the issue still exists. So the closed issue in #13 is not working as well.

I am able to create a bash session in the backend container:

> docker-compose exec backend bash
WARNING: Some services (backend, db, pgadmin, proxy) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
root@7bf80e8eb31a:/app#

I can access the Traefik and pgAdmin endpoints, but can't login using the API, or use the API endpoints.

Activity

  1. hoorayboo commented on Aug 22, 2020

    @hoorayboo

    I've had this same issue. At first, it appeared to be a CRLF -> LF issue on windows. To that end, have you tried the commands:
    git config --global core.autocrlf true
    git add --renormalize .

    That fixed the issue the first time it appeared for me. If that doesn't fix the issue, then may I ask if you are using the Docker Dashboard GUI to stop your Docker stack? I was, and this issue kept coming back for me. I had to switch to using the command line to stop the stack. Hope that helps.

  2. tiangolo commented on Dec 6, 2020

    @tiangolo
    Member

    A recent update of this project generator modifies the files after the project generation to replace those newline characters. Do you still have issues with a freshly generated project?

  3. github-actions commented on Dec 17, 2020

    @github-actions
    Contributor

    Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions