You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2016/12/07 08:53:41 UTC
[13/13] james-project git commit: JAMES-1858: New docker when it will
initial data at the beginning
JAMES-1858: New docker when it will initial data at the beginning
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/9804d653
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/9804d653
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/9804d653
Branch: refs/heads/master
Commit: 9804d6537743e37f155322a629ea7a6683a8a855
Parents: 116bcad
Author: Quynh Nguyen <qn...@linagora.com>
Authored: Tue Nov 15 17:37:08 2016 +0700
Committer: Quynh Nguyen <qn...@linagora.com>
Committed: Wed Dec 7 14:03:53 2016 +0700
----------------------------------------------------------------------
dockerfiles/run/guice/provisioned/Dockerfile | 22 ++++++++++++++++++++
.../run/guice/provisioned/initialdata.sh | 8 +++++++
dockerfiles/run/guice/provisioned/startup.sh | 5 +++++
3 files changed, 35 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/9804d653/dockerfiles/run/guice/provisioned/Dockerfile
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/provisioned/Dockerfile b/dockerfiles/run/guice/provisioned/Dockerfile
new file mode 100644
index 0000000..1acdd8a
--- /dev/null
+++ b/dockerfiles/run/guice/provisioned/Dockerfile
@@ -0,0 +1,22 @@
+# Run James
+#
+# VERSION 1.0
+
+FROM linagora/james-jpa-guice
+
+# Install git
+RUN apt-get update
+RUN apt-get install -y git
+
+WORKDIR /root
+
+RUN git clone https://github.com/vishnubob/wait-for-it.git wait-for-it
+RUN cp /root/wait-for-it/wait-for-it.sh /usr/bin/wait-for-it.sh
+
+COPY startup.sh /root
+COPY initialdata.sh /root
+
+RUN chmod +x /root/startup.sh
+RUN chmod +x /root/initialdata.sh
+
+ENTRYPOINT ["./startup.sh"]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/9804d653/dockerfiles/run/guice/provisioned/initialdata.sh
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/provisioned/initialdata.sh b/dockerfiles/run/guice/provisioned/initialdata.sh
new file mode 100644
index 0000000..d4b8093
--- /dev/null
+++ b/dockerfiles/run/guice/provisioned/initialdata.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+java -jar /root/james-cli.jar -h localhost -p 9999 adddomain james.local
+
+java -jar /root/james-cli.jar -h localhost -p 9999 adduser user01@james.local 1234
+java -jar /root/james-cli.jar -h localhost -p 9999 adduser user02@james.local 1234
+java -jar /root/james-cli.jar -h localhost -p 9999 adduser user03@james.local 1234
+
http://git-wip-us.apache.org/repos/asf/james-project/blob/9804d653/dockerfiles/run/guice/provisioned/startup.sh
----------------------------------------------------------------------
diff --git a/dockerfiles/run/guice/provisioned/startup.sh b/dockerfiles/run/guice/provisioned/startup.sh
new file mode 100644
index 0000000..13976ef
--- /dev/null
+++ b/dockerfiles/run/guice/provisioned/startup.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+wait-for-it.sh --host=localhost --port=9999 --strict --timeout=0 -- ./initialdata.sh &
+
+java -Dlogback.configurationFile=/root/conf/logback.xml -Dworking.directory=/root/ -jar james-server.jar
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org