root: attempt to build static image without django's collectstatic (#360)
* root: attempt to build static image without django's collectstatic * web: move static dockerfile to /web * web: fix dockerfile path * web: improve image size by not copying node_modules
This commit is contained in:
10
web/Dockerfile
Normal file
10
web/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
||||
FROM node as npm-builder
|
||||
|
||||
COPY . /static/
|
||||
|
||||
RUN cd /static && npm i && npm run build
|
||||
|
||||
FROM nginx
|
||||
|
||||
COPY --from=npm-builder /static/robots.txt /usr/share/nginx/html/robots.txt
|
||||
COPY --from=npm-builder /static/dist/ /usr/share/nginx/html/static/dist/
|
||||
Reference in New Issue
Block a user