Commit 72f1e213 authored by Spiros Koulouzis's avatar Spiros Koulouzis

set password as env var

parent 9657f256
FROM openjdk:11 FROM openjdk:11
COPY target/provisioner-3.0.0-jar-with-dependencies.jar provisioner-3.0.0-jar-with-dependencies.jar COPY target/provisioner-3.0.0-jar-with-dependencies.jar provisioner-3.0.0-jar-with-dependencies.jar
COPY etc/ etc COPY etc/ etc
ENV ENCRYPTION_PASSWORD=123
CMD jar -xf provisioner-3.0.0-jar-with-dependencies.jar application.properties && \ CMD jar -xf provisioner-3.0.0-jar-with-dependencies.jar application.properties && \
cat application.properties && \ cat application.properties && \
sed -ie "s#^message.broker.host=.*#message.broker.host=$RABBITMQ_HOST#" application.properties && \ sed -ie "s#^message.broker.host=.*#message.broker.host=$RABBITMQ_HOST#" application.properties && \
sed -ie "s#^sure-tosca.base.path=.*#sure-tosca.base.path=$SURE_TOSCA_BASE_PATH#" application.properties && \ sed -ie "s#^sure-tosca.base.path=.*#sure-tosca.base.path=$SURE_TOSCA_BASE_PATH#" application.properties && \
ENCRYPTION_PASSWORD=`date +%s | sha256sum | base64 | head -c 32 ; echo` && \
echo "cloud.storm.secret=$ENCRYPTION_PASSWORD" >> application.properties && \ echo "cloud.storm.secret=$ENCRYPTION_PASSWORD" >> application.properties && \
echo "cloud.storm.db.path=/etc/UD" >> application.properties && \ echo "cloud.storm.db.path=/etc/UD" >> application.properties && \
echo "credential.secret=$CREDENTIAL_SECRET" >> application.properties && \ echo "credential.secret=$CREDENTIAL_SECRET" >> application.properties && \
......
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