simple-tasks
simple-tasks copied to clipboard
Great repo. One question
I've just pulled this repo. I'm trying to get my own project running with a similar setup so when I run docker compose on and ec2 instance with daphne and gunicorn. I was just wondering about static files. Does nginx serve static files from django?
I build the repo and got this error Traceback (most recent call last):
File "./manage.py", line 15, in
Static files are served with nginx
, from docker-compose
nginx:
restart: always
image: nginx:1.12-alpine
ports:
- 8000:8000
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
- static_volume:/app/backend/server/django_static
The static_volume
is pointing to /app/backend/server/django_static
in django_static
directory you should have your static files. You should set it in settings.py
: https://github.com/pplonski/simple-tasks/blob/ae759a8100f6604b6d8fc00f19cf3aedbd945f3d/backend/server/server/settings.py#L154
From your error I see that you have staticfiles
as static dir. You should update docker-compose
and it should (have to) work.