File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,55 @@ sync; sync; sync
5757
5858docker images
5959
60+ planetdir=' tenalp'
61+ mkdir -p " $OLD /mnt/img_root/srv/$planetdir "
62+ cd " $OLD /mnt/img_root/srv/$planetdir "
63+
64+ # download Planet
65+ wget https://raw.githubusercontent.com/open-learning-exchange/planet/master/docker/planet.yml
66+ wget https://raw.githubusercontent.com/open-learning-exchange/planet/master/docker/install.yml
67+ wget https://raw.githubusercontent.com/open-learning-exchange/planet/master/docker/volumes.yml
68+ touch .chat.env
69+
70+ {
71+ echo " services:"
72+ echo " couchdb:"
73+ echo " volumes:"
74+ echo " - \" $OLD /mnt/img_root/srv/$planetdir /data:/opt/couchdb/data\" "
75+ echo " - \" $OLD /mnt/img_root/srv/$planetdir /log:/opt/couchdb/var/log\" "
76+ echo " planet:"
77+ echo " volumes:"
78+ echo " - \" $OLD /mnt/img_root/srv/$planetdir /pwd:/usr/share/nginx/html/credentials\" "
79+ } > volumestravis.yml
80+
81+ sync; sync; sync
82+
83+ docker compose -f planet.yml -f volumestravis.yml -p planet up -d
84+
85+ # check if couch-db is working
86+ while ! curl -X GET http://127.0.0.1:2200/_all_dbs ; do
87+ sleep 5
88+ docker ps -a
89+ done
90+ echo " couch is up"
91+
92+ sync; sync; sync
93+
94+ docker ps -f name=planet_db-init* -a -q
95+ # check if couch-db docker has finish
96+ while [[ $( docker inspect -f ' {{.State.Running}}' " $( docker ps -f name=planet_db-init* -a -q) " ) == " true" ]]; do
97+ sleep 1
98+ done
99+ echo " couch has finished"
100+
101+ tree -f " mnt/img_root/srv/$planetdir "
102+
103+ # sync and stop docker
104+ sync; sync; sync
105+ docker compose -f planet.yml -f volumestravis.yml -p planet stop
106+
107+ cd -
108+
60109service docker stop
61110unlink docker
62111mv docker.temp docker
You can’t perform that action at this time.
0 commit comments