my dockrize nginx can't not serve static file

hello guys . i have dockerize django app . my settings for static file is as below :

STATIC_URL = '/static/'
    os.path.join(BASE_DIR, 'static')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')

MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

my nginx.conf file :

location /logapp/static/ {
        alias /static/;

    location /logapp/media/ {
        alias /media/;

with this config my static files dont server and nginx container says get 404 error and can not fine static file . please help me for finding solution .
my debug mode is false .

Are you running your nginx and Django application in the same or different containers?

Your nginx.conf file has:

Have you set up your application to generate static URLs as /logapp/static/? (Your STATIC_URL setting is /static/ - that would be the url being created for references by default, not /logapp/static/.)

Are you running collectstatic?

they are in different containers .

also i change config of nginx to localtion /static/ but still i have the problem .

yes i run collectstatic . but no different .

Ok, if you’re running them in different containers, then you need to create a data volume in common between those two containers. Then, when you run collectstatic, Django will copy those files to the data volume for nginx to reference.