Commit 619b6cab authored by damianofalcioni's avatar damianofalcioni

configuration file is on volume folder

parent 1fe93b5e
......@@ -13,10 +13,10 @@ sudo docker build --no-cache -f msc-Dockerfile .
<pre>
sudo docker create --name app _id_from_build_
mkdir ./msc-data
sudo docker cp app:/opt/msc-data ./msc-data
sudo docker cp app:/opt/msc-data/ ./msc-data/
</pre>
3) Run the container
<pre>
sudo docker run -it -p 8080:8080 -v ${PWD}/msc-data:/opt/msc-data _id_from_build_
sudo docker run -it -p 8080:8080 -v ${PWD}/msc-data/:/opt/msc-data/ _id_from_build_
</pre>
\ No newline at end of file
......@@ -4,10 +4,10 @@
#Enable Persistence:
# sudo docker create --name app _id_from_build_
# mkdir ./msc-data
# sudo docker cp app:/opt/msc-data ./msc-data
# sudo docker cp app:/opt/msc-data/ ./msc-data/
#
#Run:
# sudo docker run -it -p 8080:8080 -v ${PWD}/msc-data:/opt/msc-data _id_from_build_
# sudo docker run -it -p 8080:8080 -v ${PWD}/msc-data/:/opt/msc-data/ _id_from_build_
#
#TODO
#- Create a script to move the services configuration at runtime
......@@ -23,9 +23,11 @@ RUN \
apt-get -qy install maven
# MSC compilation, deployment and configuration
ENV msc_log=/opt/msc-data/msc.log
ENV msc_upload_dir=/opt/msc-data/adoxx_msc_upload/
ENV msc_service_dir=/opt/msc-data/adoxx_msc_services/
ENV msc_data=/opt/msc-data
ENV MSC_CONFIG=${msc_data}/msc_config.json
ENV msc_log=${msc_data}/msc.log
ENV msc_upload_dir=${msc_data}/adoxx_msc_upload/
ENV msc_service_dir=${msc_data}/adoxx_msc_services/
RUN \
wget https://git.boc-group.eu/adoxx/microservice-controller/-/archive/master/microservice-controller-master.tar.gz -O /opt/microservice-controller-master.tar.gz && \
tar xzpf /opt/microservice-controller-master.tar.gz -C /opt && \
......@@ -37,7 +39,8 @@ RUN \
mvn -B -f /opt/microservice-controller-rest-master/pom.xml clean package && \
unzip /opt/microservice-controller-rest-master/target/micro-service-controller-rest.war -d /usr/local/tomcat/webapps/msc/ && \
rm -r /opt/microservice-controller-rest-master && \
echo '{"microservicesDefinitionFolder":"'${msc_service_dir}'","uploadFolder":"'${msc_upload_dir}'","logFileName":"'${msc_log}'","autostartEnabled":true}' > /usr/local/tomcat/webapps/msc/WEB-INF/classes/org/adoxx/microservice/api/rest/config.json
mkdir ${msc_data} && \
echo '{"microservicesDefinitionFolder":"'${msc_service_dir}'","uploadFolder":"'${msc_upload_dir}'","logFileName":"'${msc_log}'","autostartEnabled":true}' > ${MSC_CONFIG}
# maven cleanup
RUN \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment