Closed jeffusan closed 8 years ago
Thanks!
I added the shell script to the web image. I modified the path to manage.py in the shell script:
#!/bin/sh
python /user/src/app/manage.py collectstatic --noinput
/usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000
And then in the production.yml modifIed the path to the shell script:
web:
restart: always
build: ./web
expose:
- "8000"
links:
- postgres:postgres
- redis:redis
env_file: .env
command: /usr/src/app/shell-script.sh
and this works great.
I find it odd that ls does not display the new directory in the web container now, but does in nginx:
$ docker-compose run nginx ls /usr/src/app/static
admin main.css
$ docker-compose run web ls /usr/src/app/static
main.css
I just pulled this repo to try it out. It works great but I'm not able to collect static admin files correctly.
I was expecting to see the static files from the collectstatic command. Should I collect static files another way?