Closed oscanog closed 8 years ago
Hi,
I have updated the structure, but forgot the README. Basically you have one base compose file now, which you will override depending on environment.
In dev, you will just use eg docker-compose <args>
which will use docker-compose.yml
and docker-compose.override.yml
.
For production it would be: docker-compose -f docker-compose.yml -f docker-compose.prod.yml <args>
I run
docker-compose -f docker-compose.yml -f docker-compose.prod.yml build
finished building
then
docker-compose -f docker-compose.yml -f docker-compose.prod.yml run django ./bootstrap-dev
got an error
File "
Yeah, it should be False
. You probably want to set ALLOWED_HOSTS
and a different SECRET_KEY
in there as well.
File "/srv/django/.env/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/srv/django/static/admin'
Got a permission error in collectstatic. both in development and production.
I did chown the root directory, same error occurred. May I know what OS are you using?
I'm on debian, but I have also used projects based on this on os x and gentoo. I think the issue is that docker volumes are owned by root when they are ceeated and the django/react containers run as uid 1000.
Run docker-compose run ngnix chown -R 1000:1000 /srv/*
before collectstatic
and some missing module of djangorestframework-jwt
Cheers! Thanks for reporting. The chrome 'error' is just a warning because redux-form fields contains props that are not valid for dom-elements.
Redux-form 6 does things a bit differently and avoids this problem, so I should update/migrate.
I'll wait for the update, just play with your current build for now. BTW, thanks for this. this is very neat boilerplate for django react webpack + docker
I addressed the above problems, but didn't migrate redux-form yet. So, I will close this one and take care of redux-form for in #4
ERROR: .FileNotFoundError: [Errno 2] No such file or directory: './docker-compose.dev.yml'