I recently moved my nodejs application into a docker container. Everything works fine, except static files (e.g. bower components) won't get loaded (404).
Whats wrong?
In my node app:
app.use('/static', express.static(__dirname + '/../public'));
My .bowerrc
{
"directory": "public/lib"
}
Bower downloads and installs all files in the right directory. I checked it myself inside the docker container.
My dockerfile:
FROM node:4-onbuild
COPY . /src
RUN cd /src/ && npm install && bower install --allow-root
RUN ["node", "/src/server.js"]
EXPOSE 3000