Skip to content
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

/usr/src/app/static doesn't copy across from local #60

Open
mmichealjroberts opened this issue Jun 4, 2019 · 1 comment
Open

/usr/src/app/static doesn't copy across from local #60

mmichealjroberts opened this issue Jun 4, 2019 · 1 comment

Comments

@mmichealjroberts
Copy link

I can't seem to copy /static inside my project directory to /usr/src/app/static ... my css/js/img inside static are all missing.

All I seem to find is admin and rest_framework directories. Nothing else.

@donhauser
Copy link

I'm not sure whether this is the exact same situation but this is what worked with my setup:

My problem was that the static files resulted in 404-Errors.
The /usr/src/app/static directory was filled properly on the web-container, but was empty/non-existant under nginx.
In the docker-compose.yml file the static volume is mounted once under /usr/src/app/static for web and once under /www/static for nginx.

For me the exchanging the /static-alias did the job (which makes sence since static is served by the nginx-container):

I've replaced

location /static {
    alias /usr/src/app/static;
}

with

location /static {
    alias /www/static;
}

and after rebuilding nginx it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants