aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--docker-compose.override-dev.yml13
-rw-r--r--readme.txt5
-rw-r--r--web/Dockerfile13
4 files changed, 24 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 0342381..eccb215 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ build:
docker-compose -f docker-compose.yml -f docker-compose.override-dev.yml build
dev-up:
- docker-compose -f docker-compose.yml -f docker-compose.override-dev.yml up -d
+ docker-compose -f docker-compose.yml -f docker-compose.override-dev.yml up
dev-start:
docker-compose -f docker-compose.yml -f docker-compose.override-dev.yml start
diff --git a/docker-compose.override-dev.yml b/docker-compose.override-dev.yml
index b9de639..c6ee3b8 100644
--- a/docker-compose.override-dev.yml
+++ b/docker-compose.override-dev.yml
@@ -9,11 +9,24 @@
##############################################################################
version: '3'
services:
+ nginx:
+ command: echo "Nginx is disabled in dev mode."
+ restart: "no"
+
web:
image: opnfv/laas-dashboard:dev
build:
context: .
dockerfile: web/Dockerfile
+ command: >
+ sh -c "cd static && bower install --allow-root && cd .. &&
+ ./manage.py migrate &&
+ ./manage.py runserver 0:8000"
+ volumes:
+ - ./src:/laas_dashboard
+ ports:
+ - "8000:8000"
+
worker:
image: opnfv/laas-celery:dev
build:
diff --git a/readme.txt b/readme.txt
index fad9e71..6f48812 100644
--- a/readme.txt
+++ b/readme.txt
@@ -19,7 +19,10 @@ Deployment:
- complete the config.env.sample file and save it as config.env
- install docker, docker-compose
- run 'make data'
-- run 'make up' to run the dashboard
+- run 'make up' to run the dashboard (or 'make dev-up' for development)
+
+Production will be running on port 80 by default.
+Development will be running on port 8000 by default.
Updating:
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"]