docker – Why my nginx server is sending css files as text/plain?

I’m currently working with nginx to serve my compiled react project (static files) and being a reverse proxy as well. but when I upload the files I get the website without my custom fonts. I believe that it is because the request in order to gain the css files is returning the css file as text/plain and not as css file. I don’t know why and I’d like your help. adding the Dockerfile, nginx.conf and mime.types

FROM nginx:1.14.2-alpine

RUN  mkdir -p /run/nginx && 
     apk add nginx-mod-http-lua
WORKDIR /usr/src/app

COPY build /usr/src/app/build
COPY mime.types /usr/src/app

COPY nginx.conf /usr/src/app


CMD ( "nginx", "-c", "/usr/src/app/nginx.conf", "-g", "daemon off;" )


load_module /usr/lib/nginx/modules/;
load_module /usr/lib/nginx/modules/;

env DB_API;

pcre_jit on;

events {


http {

    lua_load_resty_core off;

    include /usr/src/app/mime.types;
    default_type  application/octet-stream;

    sendfile on;

    server {
        listen 8080;

        set_by_lua $db_api 'return os.getenv("DB_API")';

        location /db/ {
            rewrite ^/db(.*)$ $1 break;
            proxy_pass $db_api/clientToDBApi$uri$is_args$args;

        location /static/css/ {
            add_header Content-Type text/css;
            expires 168h;

        location / {
            root /usr/src/app/build;
            index index.html;
            try_files $uri $uri/ /index.html;


types {
  text/html                             html htm shtml;
  text/css                              css;
  image/jpeg                            jpeg jpg;
  application/x-javascript              js;
  text/plain                            txt;
  image/png                             png;
  image/x-icon                          ico;
  application/pdf                       pdf;
  application/x-rar-compressed          rar;
  application/zip                       zip;
  application/octet-stream              bin exe dll;
  application/octet-stream              iso img;
  application/octet-stream              msi msp msm;
  audio/mpeg                            mp3;
  video/mpeg                            mpeg mpg;
  video/quicktime                       mov;
  video/x-flv                           flv;
  video/x-msvideo                       avi;
  video/x-ms-wmv                        wmv;
  video/x-ms-asf                        asx asf;
  video/x-mng                           mng;