-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·39 lines (28 loc) · 1.67 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#script to create and deploy all containers needed for deployment of arcticweb
#pull images and create network and containers
full () {
#pull the latest images
echo "Pulling latest images"
docker pull dmadk/arcticweb
docker pull dmadk/embryo-couchdb
docker pull mysql
docker pull centurylink/watchtower
#create a network called arcticnet
echo "Creating network"
docker network create arcticnet
#create the containers and link them
echo "Creating containers"
docker create --name arctic_db --net=arcticnet --log-driver=fluentd --log-opt fluentd-async-connect=true --restart=unless-stopped -v $HOME/arcticweb/mysql/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=embryo -e MYSQL_PASSWORD=embryo -e MYSQL_DATABASE=embryo mysql
docker create --name arctic_couch --net=arcticnet --log-driver=fluentd --log-opt fluentd-async-connect=true --restart=unless-stopped -v $HOME/arcticweb/couchdb:/data dmadk/embryo-couchdb
docker create --name arcticweb --net=arcticnet --log-driver=fluentd --log-opt fluentd-async-connect=true --restart=unless-stopped -p 8080:8080 -v $HOME/arcticweb/properties:/opt/jboss/wildfly/arcticweb_properties -v $HOME/arcticweb:/opt/jboss/arcticweb dmadk/arcticweb
docker create --name arctic_watchtower --log-driver=fluentd --log-opt fluentd-async-connect=true --restart=unless-stopped -v /var/run/docker.sock:/var/run/docker.sock centurylink/watchtower arcticweb --cleanup
}
$1
# start logging
echo "Starting logging"
docker-compose -f logging/docker-compose.yml up -d
# start all containers
echo "Starting containers"
docker start arctic_db arctic_couch arcticweb arctic_watchtower
exit 0