nickjj / docker-django-example

A production ready example Django app that's using Docker and Docker Compose.
MIT License
1.17k stars 249 forks source link

Issues with setup #45

Closed XxMasterepicxX0 closed 3 months ago

XxMasterepicxX0 commented 4 months ago

I follow all the steps and I keep getting this error. I am using windows 11

ERROR [web app 6/10] RUN chmod 0755 bin/* && bin/pip3-install 0.4s

[web app 6/10] RUN chmod 0755 bin/* && bin/pip3-install: 0.274 /usr/bin/env: ‘bash\r’: No such file or directory 0.274 /usr/bin/env: use -[v]S to pass options in shebang lines

failed to solve: process "/bin/sh -c chmod 0755 bin/* && bin/pip3-install" did not complete successfully: exit code: 127

nickjj commented 4 months ago

Hi,

For this specific error it sounds like some of the files got saved with Windows line endings. You'll want to make sure your code editor saves files with Unix line endings.

Also, if you're on Windows you'll likely want to use WSL 2 unless you plan to skip running any of the ./run script shortcuts.

XxMasterepicxX0 commented 3 months ago

Thank you so much. I did " find . -type f -exec dos2unix {} \; " and it fixed it, I don't know that could be an issue.

This may not be the place to ask this. However, is there any way to move all the html, css, js to one folder. I see the assets file. However, I still need to make changes to home.html. I just like a separate frontend folder.

nickjj commented 3 months ago

The assets/ directory has all of the front-end CSS and JS files separated out but your Django templates would typically exist outside of that area. Everything is customizable though based on what's available with Django.

nickjj commented 3 months ago

I'm closing this as it's resolved.