diff options
author | Jeremy Plsek <jeremyplsek@gmail.com> | 2019-12-17 15:13:00 -0500 |
---|---|---|
committer | Jeremy Plsek <jeremyplsek@gmail.com> | 2019-12-17 15:13:00 -0500 |
commit | edf4d6729b94258f8b404684703984b724c45c8f (patch) | |
tree | dc02d3a7151cbb15fc8bed0f410aa3346b81b9ee /web | |
parent | 6be40a5f2d75b157cf2a2374f2f866f6fdc92b18 (diff) |
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 <jeremyplsek@gmail.com>
Change-Id: I7888ca89021fca313e1043a7f94b5e1b7e12498c
Diffstat (limited to 'web')
-rw-r--r-- | web/Dockerfile | 13 |
1 files changed, 6 insertions, 7 deletions
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"] |