error with docker-compose and django
I am trying to get started with docker and django. I followed the directions of docker-compose and created an image with a simple requirements.txt.
I now want to actually build out my app more and add templates and actual code.
1) i installed some modules on the host machine and added them to the requirements.txt file
2) i run (again) docker-compose run web django-admin.py startproject exampleproject. All my new requirements get downloaded but then i get this error:
/code/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
I am using the exact Dockerfile and docker-compose.yml as here:
http://docs.docker.com/compose/django/
how am i supposed to update the container/image with new templates/views &c and new modules as i am developing my app?
am i using docker wrong?
thanks.
python django docker docker-compose
add a comment |
I am trying to get started with docker and django. I followed the directions of docker-compose and created an image with a simple requirements.txt.
I now want to actually build out my app more and add templates and actual code.
1) i installed some modules on the host machine and added them to the requirements.txt file
2) i run (again) docker-compose run web django-admin.py startproject exampleproject. All my new requirements get downloaded but then i get this error:
/code/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
I am using the exact Dockerfile and docker-compose.yml as here:
http://docs.docker.com/compose/django/
how am i supposed to update the container/image with new templates/views &c and new modules as i am developing my app?
am i using docker wrong?
thanks.
python django docker docker-compose
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51
add a comment |
I am trying to get started with docker and django. I followed the directions of docker-compose and created an image with a simple requirements.txt.
I now want to actually build out my app more and add templates and actual code.
1) i installed some modules on the host machine and added them to the requirements.txt file
2) i run (again) docker-compose run web django-admin.py startproject exampleproject. All my new requirements get downloaded but then i get this error:
/code/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
I am using the exact Dockerfile and docker-compose.yml as here:
http://docs.docker.com/compose/django/
how am i supposed to update the container/image with new templates/views &c and new modules as i am developing my app?
am i using docker wrong?
thanks.
python django docker docker-compose
I am trying to get started with docker and django. I followed the directions of docker-compose and created an image with a simple requirements.txt.
I now want to actually build out my app more and add templates and actual code.
1) i installed some modules on the host machine and added them to the requirements.txt file
2) i run (again) docker-compose run web django-admin.py startproject exampleproject. All my new requirements get downloaded but then i get this error:
/code/manage.py already exists, overlaying a project or app into an existing directory won't replace conflicting files
I am using the exact Dockerfile and docker-compose.yml as here:
http://docs.docker.com/compose/django/
how am i supposed to update the container/image with new templates/views &c and new modules as i am developing my app?
am i using docker wrong?
thanks.
python django docker docker-compose
python django docker docker-compose
asked Oct 2 '15 at 0:55
user1139675user1139675
174315
174315
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51
add a comment |
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51
add a comment |
2 Answers
2
active
oldest
votes
I needed to remove the manage.py from the directory where i had my project (the directory where the docker-compose.yml is in).
I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch.
add a comment |
Sorry for the late addition but I thought it might help someone. I had also encountered this same problem and inspite of removing manage.py from the folder where my .yml and Dockerfile existed, it gave me same error.
I have no idea where it made the code directory which had the manage.py file. But I worked around it presently by changing the service name in the yml file and restarting the project with the new service name.
docker-compose run newservicenm django-admin.py startproject projectname directoryname
This worked as a new container!
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32899014%2ferror-with-docker-compose-and-django%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I needed to remove the manage.py from the directory where i had my project (the directory where the docker-compose.yml is in).
I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch.
add a comment |
I needed to remove the manage.py from the directory where i had my project (the directory where the docker-compose.yml is in).
I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch.
add a comment |
I needed to remove the manage.py from the directory where i had my project (the directory where the docker-compose.yml is in).
I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch.
I needed to remove the manage.py from the directory where i had my project (the directory where the docker-compose.yml is in).
I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch.
answered Oct 2 '15 at 13:53
user1139675user1139675
174315
174315
add a comment |
add a comment |
Sorry for the late addition but I thought it might help someone. I had also encountered this same problem and inspite of removing manage.py from the folder where my .yml and Dockerfile existed, it gave me same error.
I have no idea where it made the code directory which had the manage.py file. But I worked around it presently by changing the service name in the yml file and restarting the project with the new service name.
docker-compose run newservicenm django-admin.py startproject projectname directoryname
This worked as a new container!
add a comment |
Sorry for the late addition but I thought it might help someone. I had also encountered this same problem and inspite of removing manage.py from the folder where my .yml and Dockerfile existed, it gave me same error.
I have no idea where it made the code directory which had the manage.py file. But I worked around it presently by changing the service name in the yml file and restarting the project with the new service name.
docker-compose run newservicenm django-admin.py startproject projectname directoryname
This worked as a new container!
add a comment |
Sorry for the late addition but I thought it might help someone. I had also encountered this same problem and inspite of removing manage.py from the folder where my .yml and Dockerfile existed, it gave me same error.
I have no idea where it made the code directory which had the manage.py file. But I worked around it presently by changing the service name in the yml file and restarting the project with the new service name.
docker-compose run newservicenm django-admin.py startproject projectname directoryname
This worked as a new container!
Sorry for the late addition but I thought it might help someone. I had also encountered this same problem and inspite of removing manage.py from the folder where my .yml and Dockerfile existed, it gave me same error.
I have no idea where it made the code directory which had the manage.py file. But I worked around it presently by changing the service name in the yml file and restarting the project with the new service name.
docker-compose run newservicenm django-admin.py startproject projectname directoryname
This worked as a new container!
edited Nov 15 '18 at 19:29
ltd9938
9641823
9641823
answered Nov 15 '18 at 18:49
DocDoc
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f32899014%2ferror-with-docker-compose-and-django%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
have you removed the container before trying to run docker-compose again?
– mh00h
Oct 2 '15 at 1:03
I needed to remove the manage.py from the directory where i had my project - i thought it would just update with new requirements but i think if i wanted to do that i would have to restart the project all over again. I guess once you start a project, you install new requirements on the container itself and add them to requirements.txt for the next time you build your project from scratch
– user1139675
Oct 2 '15 at 13:51