Error: Writing app Caused by: Is a directory (os error 21)

wolverin0HOBBY

2 days ago

Apparently I can't deploy my app because it already has an /app folder. How do I solve this without having to modify my whole app?

$10 Bounty

7 Replies

2 days ago

Why does it matter your app already has a /app folder?

Oh. Make your own Dockerfile! What's the stack?

Can you also show the error in context?


wolverin0HOBBY

2 days ago

╔══════════════════════════════ Nixpacks v1.38.0 ══════════════════════════════╗

Jun 10 19:38:54

║ setup │ python3, postgresql_16.dev, gcc ║

Jun 10 19:38:54

║──────────────────────────────────────────────────────────────────────────────║

Jun 10 19:38:54

║ install │ pip install -r requirements.txt ║

Jun 10 19:38:54

║──────────────────────────────────────────────────────────────────────────────║

Jun 10 19:38:54

║ build │ echo 'Skipping default Nixpacks build to avoid app/ directory ║

Jun 10 19:38:54

║ │ conflict.' ║

Jun 10 19:38:54

║──────────────────────────────────────────────────────────────────────────────║

Jun 10 19:38:54

║ start │ python main.py

Jun 10 19:38:54

╚══════════════════════════════════════════════════════════════════════════════╝

Jun 10 19:38:57

Error: Writing app

Jun 10 19:38:57

Caused by:

Jun 10 19:38:57

Is a directory (os error 21)


2 days ago

Add the following in a file named Dockerfile (no file extension)

FROM python:3.11-slim
WORKDIR /src
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "main.py"]

wolverin0HOBBY

2 days ago

with that (i changed main.py to server.py which is my file)
i get another error now

Initialization

(00:35)

Build

(01:15)

Deploy

(00:09)

Network › Healthcheck

(01:25)

Healthcheck failure

but theres nothing i can see on the logs to further check


2 days ago

Can you show what path your health check is using? Can you confirm that path works locally?


wolverin0HOBBY

2 days ago

Healthcheck path

/


wolverin0

Healthcheck path/

2 days ago

Can you share your repository? Does the / path work if you disable the healthcheck?


Error: Writing app Caused by: Is a directory (os error 21) - Railway Help Station