-
Notifications
You must be signed in to change notification settings - Fork 133
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
Improve docker-compose.yml / setup.md #208
Comments
Hey @ShatteredBunny , thanks for going through this painful process and pinning down so precisely the fixes that are needed.
I wonder whether this is an issue after the first build? Usually no more builds will be needed in the dev workflow. There is quite a bit of malpractice on that docker-compose and also in the
Indeed, in addition
Agree
Again, very appreciated for this Issue. There has not been many devs that have gone through the process of spinning up the full dev stack and these pain-points have remained largely ignored. Hoping to make it a more seamless experience going forward. |
The GRPC files are only generated within the image, so the image would work after the build. But the local files are mounted above the files in the image, so at some point GRPC generation must be run for the local repository, either on the host or while the repository is mounted into the container. I chose the second option in the PR Alternatively the grpc files could be placed somewhere where they are not shadowed by the mount ("globally" in the image, e.g. |
Is your feature request related to a problem? Please describe.
Despite the single docker-compose file, it is still not easy to get started and there were quite a few pitfalls, at least for me
docker-compose build
copies the whole context and executes setup commands there, so they need to be run again locally (because the local files get mounted into the containers). This is mentioned in setup.md, but is not really convenient. Maybe this could be executed when a container is started (and not during the build). Or run a script using the backend image before runningdocker-compose up
, no python setup would be needed on the host.docker exec -it django-dev python3 manage.py makemigrations
only generated a migration forapi
(which failed to migrate because of missing tables fromcontrol
), I needed to rundocker exec -it django-dev python3 manage.py makemigrations [control|chat]
separately to create all migrations. I'm not familiar with django so I don't know what went wrong. Also for me it wasn't clear, that the user created withcreatesuperuser
must be in theESCROW_USERNAME
.env variable/mnt/development
is quite specific and it may not be possible to use depending on the system configuration. Imo a generic location would be better (either a docker volume, or at least a directory within the repo; one could create a symlink to wherever large data should be stored)These are all rather small problems, but they take time to solve and make getting started more complicated
The text was updated successfully, but these errors were encountered: