Interactive container with instructions
diff --git a/xos/configurations/frontend/Dockerfile.frontend b/xos/configurations/frontend/Dockerfile.frontend
index 4f0acf6..bdf9186 100644
--- a/xos/configurations/frontend/Dockerfile.frontend
+++ b/xos/configurations/frontend/Dockerfile.frontend
@@ -1,3 +1,8 @@
+
+###############################################################################
+########################## START FRONTEND TASKS ###############################
+###############################################################################
+
RUN mkdir -p /root/setup
RUN echo "autostart=false" >> /etc/supervisor/conf.d/observer.conf
diff --git a/xos/configurations/frontend/Makefile b/xos/configurations/frontend/Makefile
index 500e932..0a1f04a 100644
--- a/xos/configurations/frontend/Makefile
+++ b/xos/configurations/frontend/Makefile
@@ -9,12 +9,16 @@
sudo apt-get -y install httpie
cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile
cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile .
- echo $(XOS_FOLDER)
sudo docker run -v $(XOS_FOLDER)/../../core/xoslib:/opt/xos/core/xoslib -p 9999:8000 --add-host="0.0.0.0:127.0.0.1" xos
- #sudo docker run -d --add-host="0.0.0.0:$(MYIP)" -p 9999:8000 xos
bash ../common/wait_for_xos.sh
echo $(RUNNING_CONTAINER)
+interactive:
+ cat ../common/Dockerfile.common Dockerfile.frontend > Dockerfile
+ cd ../../..; sudo docker build -t xos -f xos/configurations/frontend/Dockerfile .
+ echo "Inside the container run: /usr/bin/make -C /opt/xos/configurations/frontend -f Makefile.inside"
+ sudo docker run -it -v $(shell pwd)/../..:/opt/xos -p 9999:8000 --add-host="0.0.0.0:127.0.0.1" xos
+
stop:
sudo docker stop $(RUNNING_CONTAINER)
diff --git a/xos/configurations/frontend/Makefile.inside b/xos/configurations/frontend/Makefile.inside
index 0801c7c..f3fc898 100644
--- a/xos/configurations/frontend/Makefile.inside
+++ b/xos/configurations/frontend/Makefile.inside
@@ -1,6 +1,10 @@
all: setup_xos run_develserver
setup_xos:
+ chmod +x /opt/xos/scripts/opencloud;
+ /opt/xos/scripts/opencloud genkeys;
+ /opt/xos/scripts/opencloud remigrate;
+ bash /opt/xos/tosca/install_tosca.sh;
bash /opt/xos/scripts/docker_setup_xos
python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
diff --git a/xos/configurations/frontend/README.md b/xos/configurations/frontend/README.md
index 0cb1363..db3c99f 100644
--- a/xos/configurations/frontend/README.md
+++ b/xos/configurations/frontend/README.md
@@ -9,11 +9,15 @@
## Getting Started
-- Navigate to '/xos/configurations/frontend' folder
+- Navigate to `/xos/configurations/frontend` folder
- Run `make` command
You'll be able to visit XOS at `0.0.0.0:9000` and the `xos/core/xoslib` folder is shared with the container. This means that any update to that folder is automatically reported in the container.
+>If you need to work on the Django application there is an alternative command to setup your config. Using `make interactive` instead of `make` an interactive container will be set up and the whole `xos` folder is shared.
+>
+> _NOTE: once the container has started, be sure to isse `CMD /usr/bin/make -C /opt/xos/configurations/frontend -f Makefile.inside` command. Please be carefull and do not commit migrations, private keys or other autogenerated files.
+
### Docker Helpers
Stop the container: `make stop`