-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile #644
Dockerfile #644
Conversation
Probably worth having a compose file as well? Unless I'm missing something here. |
@marksweb yes - i agree. Do you think by default this should include e.g. tasks (redis + celery), user uploads, etc? Should it be maximal or minimal? |
@chrisclark If it's for giving people an example, then the more the better I suppose. So could have a full setup, or something more complex that offers the different options from a basic setup through to all the options. |
@marksweb i am getting frustrated with the docker-compose file. It has some issue when running the vite dev server, that is not present in the dockerfile. It's very annoying. Basically running this:
Works fine, but running:
Leads to this error:
I've messed around with it for a while now and can't get it to work and am inclined to just give up for now, and leave this open if anyone wants to pick it up. I just don't understand why running the container via docker-compose is fundamentally different from running the container 'directly' via the dockerfile, which is what I'd need to understand to debug this. I've done some googling and tried various copy-paste-esque solutions from e.g. github issues and stack overflow, but no luck. |
Alright, I now know the issue -- basically the docker-compose mounts the local filesystem into the /app volume, which steps on the node_modules directory within the container, with the host filesystem's node_modules directory. In theory this could be resolved by adding a named mounted volume for node_modules -- but goddamit I can't get it to work! Eg. this approach should really work: But I just can't get it to. I get an error about 'the volume is busy' when trying to clean and re-install the npm modules. This is super frustrating because obviously this is a totally simple docker setup. Frustrating. |
@chrisclark Interesting problem - and a niche one to figure out. Perhaps a |
With the clarity of it not being midnight, I got this working! I added a volume to the docker-compose specifically for node_modules, removed the npm clean and install from the entrypoint script (so if npm dependencies change, the docker container will have to be rebuilt), and added node_modules to dockerignore. Phew! I swear I tried this last night and it didn't work -- but now it does! docker-compose build Voila! I'll extend this a bit more when I have some time. Thanks for the encouragement @marksweb |
Excellent news! And bare in mind that |
removed start.sh small updates to settings.py
This adds a dockerfile to allow the project to run with a single command. It will replace start.sh.