Skip to content

Commit 04f1072

Browse files
committed
chore: add --restart always for to automatic start container
1 parent 85c6a4a commit 04f1072

File tree

8 files changed

+9
-2
lines changed

8 files changed

+9
-2
lines changed

scripts/installation/etcd.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ onex::etcd::docker::install()
2222
{
2323
onex::common::network
2424
docker run -d --name onex-etcd \
25+
--restart always \
2526
--network onex \
2627
-v ${ONEX_ETCD_DIR}:/etcd-data \
2728
-p ${ONEX_ACCESS_HOST}:${ONEX_ETCD_CLIENT_PORT}:2379 \

scripts/installation/jaeger.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ onex::jaeger::docker::install()
1919
{
2020
onex::common::network
2121
docker run -d --name onex-jaeger \
22+
--restart always \
2223
--network onex \
2324
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
2425
-p ${ONEX_ACCESS_HOST}:6831:6831/udp \

scripts/installation/kafka.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ ONEX_KAFKA_PORT=${ONEX_KAFKA_PORT:-4317}
1919
onex::kafka::docker::install()
2020
{
2121
onex::common::network
22-
docker run -d --name onex-zookeeper --network onex -p 2181:2181 -t wurstmeister/zookeeper
22+
docker run -d --restart always --name onex-zookeeper --network onex -p 2181:2181 -t wurstmeister/zookeeper
2323
docker run -d --name onex-kafka --link onex-zookeeper:zookeeper \
24+
--restart always \
2425
--network onex \
2526
--restart=always \
2627
-v /etc/localtime:/etc/localtime \

scripts/installation/mariadb.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ onex::mariadb::docker::install()
2323

2424
onex::common::network
2525
docker run -d --name onex-mariadb \
26+
--restart always \
2627
--network onex \
2728
-v ${ONEX_THIRDPARTY_INSTALL_DIR}/mariadb:/var/lib/mysql \
2829
-p ${ONEX_ACCESS_HOST}:${ONEX_MYSQL_PORT}:3306 \

scripts/installation/mongo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ onex::mongo::docker::install()
2828

2929
onex::common::network
3030
docker run -d --name onex-mongo \
31+
--restart always \
3132
--network onex \
3233
-v ${ONEX_THIRDPARTY_INSTALL_DIR}/mongo:/data \
3334
-p ${ONEX_ACCESS_HOST}:${ONEX_MONGO_PORT}:27017 \

scripts/installation/onex.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ onex::onex::docker::install()
4141
# "Failed to get D-Bus connection: Operation not permitted"
4242
onex::common::network
4343
docker run -d --name onex \
44+
--restart always \
4445
--network onex \
4546
--privileged \
4647
-v onex-volume:${ONEX_INSTALL_DIR}:rw \

scripts/installation/redis.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ onex::redis::docker::install()
2222

2323
onex::common::network
2424
docker run -d --name onex-redis \
25+
--restart always \
2526
--network onex \
2627
-v ${ONEX_THIRDPARTY_INSTALL_DIR}/redis:/data \
2728
-p ${ONEX_ACCESS_HOST}:${ONEX_REDIS_PORT}:6379 \

scripts/installation/template.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ONEX_TEMPLATE_PORT=${ONEX_TEMPLATE_PORT:-xxxx}
1717
# Install template using containerization.
1818
onex::template::docker::install()
1919
{
20-
# docker run -d --name onex-xxx ...
20+
# docker run -d --restart always --name onex-xxx ...
2121
onex::template::status || return 1
2222
onex::template::info
2323
onex::log::info "install template successfully"

0 commit comments

Comments
 (0)