For those with issue: SyntaxError: Generator expression must be parenthesized. The issue is because of a recent patch to Django 1.11 I fixed it by changing the requirements.txt file. Replace Django==1.11 to Django==1.11.17 Then in your terminal run: docker-compose build Then rerun the command docker-compose run web python src/profiles_project/manage.py migrate
Amazing. You took less than 20 minutes to show us, explained every line and what they mean, and the best part; it worked! The only thing I had to change was the pathing for running manage.py, I didn't need the folders to run the scripts. Thanks!
Hello! great video, helped me a lot! but I have a doubt when there is a syntax error the docker container crashes and I have to raise it again by hand. Any ideas to correct this?
thank you first of all for this very understandable tutorial, i just wana know how can a distant front end developper use my docker container, to test his requests ??
Awesome tutorials, it would be great if you could teach us how to deploy one of your projects with best practices of data storing and cloud configurations. I took the TDD course and got stuck on deploying the project to the cloud. Thanks!
Hi, I am very new to Docker. I just had a quick question, can production applications be successful with docker compose for windows? Or will I need to use docker compose for windows server?
I need a help on creating a dockerize django project in which i can easily alter the internal files of django and it should be reflected to the live container without restarting it.
I've been asked to start docker machine. I can't create one docker-machine because "Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory" "
this answer should solve your problem (even tho it is not docker related) stackoverflow.com/questions/21757368/unable-to-start-genymotion-virtual-device-incompatible-cpu/21757529#21757529
It is working on my machine with this Dockerfile first line: FROM python:2.7 Linux Mint 18.3 "Sylvia" (based on Ubuntu Xenial), docker version 17.03.2-ce, docker-compose version 1.22.0, requirements.txt, dockerfile and docker-compose.yml as in the tutorial.
when I run the migrate command, I am getting the below error SyntaxError: Generator expression must be parenthesized can any one please help me, how to solve this error
First, thanks for the awesome video. Can you make a short video on how to dockerize an existing django app with postgresql? I'm facing a lot of problem. it's showing: django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432? could not connect to server: Cannot assign requested address Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? No idea what to do.... :-(
As Daniele says, please could you do a tutorial for deploying nginx-gunicorn-postgres image, I have tried everything but can't get the container to run on the server.
When I am trying to execute the docker-compose up command or migrate command, i am getting permission denied error (null): can't open file 'src/profiles_project/manage.py': [Errno 13] Permission denied Any help please.
Thanks Younes! Appreciate you taking the REST tutorial and glad you found it useful. No particular reason for the change in port, it may have been because I was running the Vagrant version of this project in port 8080 and I wanted to avoid a clash.
Thanks for the quick reply. Any new Udemy courses coming soon ? I am trying to learn how to combine Django Rest Framework with React Native to build mobile applications.
If you make some changes to the existing model (add a new column, which is a required field) and perform "migrate" command it will ask you to enter a value for the existing rows... How could you automatic this in the case of continuous deployment..
Hi, I'm trying this to get Docker setup for your corresponding udemy course, but I'm getting the following error at the end when I try to run it (I also get the same error when I first ran your migration command). I've cloned your git repo and believe I did everything the same as you did in this clip, but I'm not sure if I've made a mistake somewhere, so if you have any ideas please let me know? $ docker-compose up Starting byobprofilesrestapi_web_1 ... Starting byobprofilesrestapi_web_1 ... done Attaching to byobprofilesrestapi_web_1 web_1 | python: can't open file 'src/profiles_project/manage.py': [Errno 2] No such file or directory byobprofilesrestapi_web_1 exited with code 2
Hi Tim, It looks like the source files are not being copied to the docker image when running `docker build`. Would you kindly share your code with me via GitHub and I can take a look at why this might be?
Great tutorial, saved my ass! Got a question and I don't know how much it makes sense.. when you create a docker image, how can you copy it? Like let's say I was to pass it to someone via email, is it possible?
Hey mate, glad you found it useful! Basically you would either share the `Dockerfile` or you can publish the image to a registry such as hub.docker.com/ using `docker push`. Then they should be able to pull it down using the registry URL.
thank you for your response. One last question, if I need to mount a config file to that image, is it possible? what should I be looking for? Again, great job. I'll make sure to subscribe.
I fixed it by changing the requirements.txt file. Replace Django==1.11 to Django==1.11.17 Then in your terminal run: docker-compose build Then rerun the command docker-compose run web python src/profiles_project/manage.py migrate
For those with issue: SyntaxError: Generator expression must be parenthesized.
The issue is because of a recent patch to Django 1.11
I fixed it by changing the requirements.txt file.
Replace Django==1.11 to Django==1.11.17
Then in your terminal run:
docker-compose build
Then rerun the command
docker-compose run web python src/profiles_project/manage.py migrate
That worked thanks.
Amazing. You took less than 20 minutes to show us, explained every line and what they mean, and the best part; it worked!
The only thing I had to change was the pathing for running manage.py, I didn't need the folders to run the scripts. Thanks!
Thank you! Can you make a tutorial for production using nginx-gunicorn-postgresql?
Does this help? th-cam.com/video/3cRT1RmCyKg/w-d-xo.html
would be really useful if either the Dockerfile or the docker-compose file could get the git repository ... how would you make one of them do that?
it works..! thanks bro, it's so useful for me
Hello! great video, helped me a lot! but I have a doubt when there is a syntax error the docker container crashes and I have to raise it again by hand. Any ideas to correct this?
Thanks for such a good explanation
Thank you for watching!
This still applies to 2021. Thank you a lot!
Thanks man! It is a super useful and well explained video! Thanks a lot!
Thank you so much.
How do you deal with creating a superuser for django admin login
Good question, you can run `docker-compose run web python src/profiles_project/manage.py createsuperuser` for that I believe.
Thank you
Thanks
thank you first of all for this very understandable tutorial, i just wana know how can a distant front end developper use my docker container, to test his requests ??
It's worked! Thank you, i'm starting with docker and loving it!
Thanks a lot London App Developer. Easy and simple explanations.Nicely done.
Awesome tutorials, it would be great if you could teach us how to deploy one of your projects with best practices of data storing and cloud configurations. I took the TDD course and got stuck on deploying the project to the cloud. Thanks!
Funny you should ask. We have a new deployment course out today. Check out our latest video to learn more. Thanks for the support!
Hi, I am very new to Docker. I just had a quick question, can production applications be successful with docker compose for windows? Or will I need to use docker compose for windows server?
Thank you for making this!
I need a help on creating a dockerize django project in which i can easily alter the internal files of django and it should be reflected to the live container without restarting it.
This is done using a volume mapping in docker-compose.
Great video.... Thanks a lot buddy... how to connect this docker file with Apache and mod-wsgi?
Nice tutorial. How do I stop (CTRL C) and then start the server again?
what web server would you recommend for production? how would I set it up with docker?
Michael Stewart heroku?
I've been asked to start docker machine. I can't create one docker-machine because "Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory"
"
this answer should solve your problem (even tho it is not docker related) stackoverflow.com/questions/21757368/unable-to-start-genymotion-virtual-device-incompatible-cpu/21757529#21757529
Django 1.11 won't run with Python 3.7, gives a Syntax Error. Solved this by changing the Dockerfile's first line:
FROM python:3.6-alpine
I am still facing this issue. Are there any steps to follow after changing this in Dockerfile?
It is working on my machine with this Dockerfile first line:
FROM python:2.7
Linux Mint 18.3 "Sylvia" (based on Ubuntu Xenial), docker version 17.03.2-ce, docker-compose version 1.22.0, requirements.txt, dockerfile and docker-compose.yml as in the tutorial.
Do you know how to install Matplotlib in requirements.txt?
Hi Can you do video create docker image for running python django with nginx and gunicorn
when I run the migrate command, I am getting the below error
SyntaxError: Generator expression must be parenthesized
can any one please help me, how to solve this error
Sounds like you missed some syntax... Could be a simple typo. I suggest double checking your code against the code created in the video.
@@LondonAppDeveloper Thank you very much for your reply
First, thanks for the awesome video. Can you make a short video on how to dockerize an existing django app with postgresql? I'm facing a lot of problem. it's showing:
django.db.utils.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
No idea what to do.... :-(
do you solve that error? :(
As Daniele says, please could you do a tutorial for deploying nginx-gunicorn-postgres image, I have tried everything but can't get the container to run on the server.
Does this help? th-cam.com/video/3cRT1RmCyKg/w-d-xo.html
When I am trying to execute the docker-compose up command or migrate command, i am getting permission denied error
(null): can't open file 'src/profiles_project/manage.py': [Errno 13] Permission denied
Any help please.
fixed it, it was because on my linux environment selinux was enabled.
Database will be created each time you starts docker
Can I delete my vagrant file and Vagrant folder after I add Docker
very nice video thanx
Thanks. I followed your REST tutorial. It was fantastic. Here you used port 8000 instead of 8080, any reason for this small change ?
Thanks Younes! Appreciate you taking the REST tutorial and glad you found it useful. No particular reason for the change in port, it may have been because I was running the Vagrant version of this project in port 8080 and I wanted to avoid a clash.
Thanks for the quick reply. Any new Udemy courses coming soon ? I am trying to learn how to combine Django Rest Framework with React Native to build mobile applications.
Nice guide! What command would I put in my compose to make migrations and apply them, or would this be done manually, typically?
Hey Andy, you would run "docker-compose run web python src/profiles_project/manage.py migrate"
If you make some changes to the existing model (add a new column, which is a required field) and perform "migrate" command it will ask you to enter a value for the existing rows... How could you automatic this in the case of continuous deployment..
awsome video. Thank you. One thing that I want you to upgrade ur mic for more clear voice
Thanks for watching and for the feedback. We do have a professional Mic so we'll look at how we can tweak the setitngs to make it clearer.
Hey, I am from india. it is cool dude, can you tell me how we can make microservices?
Hi, I'm trying this to get Docker setup for your corresponding udemy course, but I'm getting the following error at the end when I try to run it (I also get the same error when I first ran your migration command). I've cloned your git repo and believe I did everything the same as you did in this clip, but I'm not sure if I've made a mistake somewhere, so if you have any ideas please let me know?
$ docker-compose up
Starting byobprofilesrestapi_web_1 ...
Starting byobprofilesrestapi_web_1 ... done
Attaching to byobprofilesrestapi_web_1
web_1 | python: can't open file 'src/profiles_project/manage.py': [Errno 2] No such file or directory
byobprofilesrestapi_web_1 exited with code 2
Hi Tim, It looks like the source files are not being copied to the docker image when running `docker build`. Would you kindly share your code with me via GitHub and I can take a look at why this might be?
Great tutorial, saved my ass! Got a question and I don't know how much it makes sense.. when you create a docker image, how can you copy it? Like let's say I was to pass it to someone via email, is it possible?
Hey mate, glad you found it useful! Basically you would either share the `Dockerfile` or you can publish the image to a registry such as hub.docker.com/ using `docker push`. Then they should be able to pull it down using the registry URL.
thank you for your response. One last question, if I need to mount a config file to that image, is it possible? what should I be looking for? Again, great job. I'll make sure to subscribe.
Need to work on your audio.. Can barely hear you.
Dude, "SyntaxError: Generator expression must be parenthesized" this is what i am getting
I fixed it by changing the requirements.txt file.
Replace Django==1.11 to Django==1.11.17
Then in your terminal run:
docker-compose build
Then rerun the command
docker-compose run web python src/profiles_project/manage.py migrate
Superb content, bad audio :\