Thanks for the great content! I find your way of copy/pasting code snippets and then explaining them works just fine, and makes the videos somewhat shorter. 👍👍
First of all, THANK YOU for videos!! You have done an amazing job !!! Anyway I followed all 3 models but I don't understand why nothing is working ehehhehe . First of all I had a problem to download NETCAT and choose btw tradional and openbsd. After choose netcat-traditional I have encoutered the endpoint's problem tackled already changig the permission. Even now after run the command build nothing is displaying in my docker desktop and i localhost doesn't change to api ... Do you have any tip to put me in the right path ????
Yeah it looks like something is broken. It’ll be hard for me to debug without the traceback. Also , it’s been a while since I’ve looked at this project. I know that some users had issues when running the containers on mac or Ubuntu… have you checked out the issues on GitHub? Bobby
Hi Bobby, I have completed all of module 3 and for some reason my API container is not working. I have researched some of the Docker docs and can't seem to find the solution. Would have any pointers to some basic troubleshooting that could help figure out the issue. Please and thank you.
Hi Bobby, I'm afraid my API container running into a similar issue exec /code/docker/entrypoints/entrypoint.sh: no such file or directory Any suggestions would be greatly appreciated! Also the request returns this error. http: error: ConnectionError: HTTPConnectionPool(host='api', port=8000): Max retries exceeded with url: /contact/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) while doing a POST request to URL: api:8000/contact/
This would suggest that you need to change permission on the bash file but this is done in the Dockerfile. Try changing the dockerfile to the following. FROM python:3.10 ENV PYTHONUNBUFFERED 1 ENV PYTHONDONTWRITEBYTECODE 1 RUN set -e; apt-get update ; apt-get -y install netcat ; apt-get -y install gettext ; RUN mkdir /code COPY . /code/ WORKDIR /code RUN set -e; /usr/local/bin/python -m pip install --upgrade pip ; python -m pip install -r /code/requirements.txt ;\ EXPOSE 8000 CMD [ "python", "manage.py" , "runserver"] You will then need to run the following code in Docker CLI python manage.py makemigrations python manage.py migrate
Hi Bobby, I followed all steps (script for is slightly different from the one you're showing in your video, class ContactViewSet is called ContactAPIView in my downloaded script), and somehow no endpoint 'contact' has been made on the server... Could you help me out? Thanks!
If an ""exec: \"/entrypoint.sh\": permission denied" error shows up: cd into docker/entrypoints and enter "chmod +x entrypoint.sh" into the terminal and rebuild via "docker-compose up -d --build"
Yeah, some people have had the permission error. Changing the entry point command to the following also works: CMD [ "python", "manage.py" , "runserver"]
Thanks for the great content! I find your way of copy/pasting code snippets and then explaining them works just fine, and makes the videos somewhat shorter. 👍👍
Glad you enjoy the format 😀
Thanks again, apreciate the effort and the content quality!
Thank you for the feedback
First of all, THANK YOU for videos!! You have done an amazing job !!! Anyway I followed all 3 models but I don't understand why nothing is working ehehhehe . First of all I had a problem to download NETCAT and choose btw tradional and openbsd. After choose netcat-traditional I have encoutered the endpoint's problem tackled already changig the permission. Even now after run the command build nothing is displaying in my docker desktop and i localhost doesn't change to api ... Do you have any tip to put me in the right path ????
Yeah it looks like something is broken. It’ll be hard for me to debug without the traceback. Also , it’s been a while since I’ve looked at this project.
I know that some users had issues when running the containers on mac or Ubuntu… have you checked out the issues on GitHub?
Bobby
Hi Bobby, I have completed all of module 3 and for some reason my API container is not working. I have researched some of the Docker docs and can't seem to find the solution. Would have any pointers to some basic troubleshooting that could help figure out the issue. Please and thank you.
Hi mate. I just emailed you.
I think it’s the line endings. Try changing LF to CRLF on the dockerfiles.
And entry points
Hi Bobby, I'm afraid my API container running into a similar issue exec /code/docker/entrypoints/entrypoint.sh: no such file or directory
Any suggestions would be greatly appreciated!
Also the request returns this error.
http: error: ConnectionError: HTTPConnectionPool(host='api', port=8000): Max retries exceeded with url: /contact/ (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) while doing a POST request to URL: api:8000/contact/
This would suggest that you need to change permission on the bash file but this is done in the Dockerfile. Try changing the dockerfile to the following.
FROM python:3.10
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
RUN set -e;
apt-get update ;
apt-get -y install netcat ;
apt-get -y install gettext ;
RUN mkdir /code
COPY . /code/
WORKDIR /code
RUN set -e;
/usr/local/bin/python -m pip install --upgrade pip ;
python -m pip install -r /code/requirements.txt ;\
EXPOSE 8000
CMD [ "python", "manage.py" , "runserver"]
You will then need to run the following code in Docker CLI
python manage.py makemigrations
python manage.py migrate
@@DidCoding simply changing that final docker entry point line to CMD [ "python", "manage.py" , "runserver"] appears to have done the trick. Thanks!!
@@kennytanner1329 🙌
Hi Bobby, I followed all steps (script for is slightly different from the one you're showing in your video, class ContactViewSet is called ContactAPIView in my downloaded script), and somehow no endpoint 'contact' has been made on the server... Could you help me out?
Thanks!
There were some alterations made to the repo.
Have you added the url?
If in doubt, pull down the code from the following module 👍
Thanks
Bobby
thank you so much
🙌
If an ""exec: \"/entrypoint.sh\": permission denied" error shows up:
cd into docker/entrypoints and enter "chmod +x entrypoint.sh" into the terminal and rebuild via "docker-compose up -d --build"
Yeah, some people have had the permission error.
Changing the entry point command to the following also works:
CMD [ "python", "manage.py" , "runserver"]