Add npm to Dockerfile
This commit is contained in:
parent
abd1965285
commit
a03456c60c
@ -1,11 +1,14 @@
|
||||
FROM python:3.9 as builder
|
||||
# enchant dependency for sphinx
|
||||
RUN apt-get update && apt-get install -y python-enchant
|
||||
# enchant dependency for sphinx and npm for webpack
|
||||
RUN apt-get update && apt-get install -y python-enchant npm
|
||||
# copy source files
|
||||
WORKDIR /access_controller/
|
||||
COPY ./ /access_controller
|
||||
# dev requirements for building sphinx docs
|
||||
RUN pip install -r requirements/dev.txt -r requirements/prod.txt
|
||||
# build js dist
|
||||
RUN npm install -g npx
|
||||
RUN (cd main/control_page_js_modules && npm install && npx webpack)
|
||||
# build static and documentation files into build/webserver
|
||||
RUN ./manage.py collectstatic --no-input && ./documentation.sh
|
||||
# create production venv to copy to final image
|
||||
@ -22,5 +25,6 @@ USER actrl
|
||||
EXPOSE 8000
|
||||
CMD . venv/bin/activate && \
|
||||
python manage.py migrate && \
|
||||
rm -rf srv/* && \
|
||||
cp -rT webserver srv && \
|
||||
daphne -b 0.0.0.0 access_controller.asgi:application
|
||||
|
10105
main/control_page_js_modules/package-lock.json
generated
10105
main/control_page_js_modules/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,9 @@
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"save-dev": "0.0.1-security",
|
||||
"webpack": "^5.36.2",
|
||||
"webpack-cli": "^4.6.0"
|
||||
"webpack": "^5.36.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"webpack-cli": "^4.7.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user