From edf4d6729b94258f8b404684703984b724c45c8f Mon Sep 17 00:00:00 2001 From: Jeremy Plsek Date: Tue, 17 Dec 2019 15:13:00 -0500 Subject: devel: use mounts for development This removes the need to rebuild the containers every time for simple changes during development. This does not include python dependencies since those are installed globally in the container. (I would have done the same for JS dependencies, but it's used in the static files.) Removed the background flag for running in dev mode when using make. It's easier to kill the servers (^C) and view logs of the server without needing to call separate commands later. Nginx is disabled in dev mode since the server and static files are handled by Django instead. Update readme to reflect upon changes made. Signed-off-by: Jeremy Plsek Change-Id: I7888ca89021fca313e1043a7f94b5e1b7e12498c --- web/Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'web') diff --git a/web/Dockerfile b/web/Dockerfile index bdb9b41..fe525ca 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -6,21 +6,20 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -FROM node as static -RUN npm install -g bower -ADD src/static/ /static -WORKDIR /static/ -RUN bower install --allow-root - FROM python:3.5 ENV PYTHONUNBUFFERED 1 +RUN apt-get update && apt-get install -y npm +RUN npm install -g bower + ADD requirements.txt /requirements.txt RUN pip install -r /requirements.txt ADD web/init.sh /init.sh ADD src/ /laas_dashboard/ -COPY --from=static /static/ laas_dashboard/static/ + +ADD src/static/ laas_dashboard/static/ +RUN cd laas_dashboard/static/ && bower install --allow-root WORKDIR /laas_dashboard/ CMD ["/init.sh"] -- cgit 1.2.3-korg