Give timeout to stop docker-compose, SIGKILL clightning

This commit is contained in:
nicolas.dorier 2018-11-05 18:24:53 +09:00
parent 1eed2e6feb
commit 487565658a
8 changed files with 12 additions and 10 deletions

View File

@ -3,4 +3,4 @@
. /etc/profile.d/btcpay-env.sh
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE down
docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180

View File

@ -3,5 +3,5 @@
. /etc/profile.d/btcpay-env.sh
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE down
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d
docker-compose -f $BTCPAY_DOCKER_COMPOSE down -t 180
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d -t 180

View File

@ -270,9 +270,9 @@ Requires=docker.service network-online.target
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d'
ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180'
ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" stop'
ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart'
ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart -t 180'
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service
@ -299,7 +299,7 @@ stop on runlevel [!2345]
script
. /etc/profile.d/btcpay-env.sh
cd \"\$(dirname \$BTCPAY_ENV_FILE)\"
docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d
docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d -t 180
end script" > /etc/init/start_containers.conf
echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n"
initctl reload-configuration
@ -313,7 +313,7 @@ if [ ! -z "$OLD_BTCPAY_DOCKER_COMPOSE" ] && [ "$OLD_BTCPAY_DOCKER_COMPOSE" != "$
docker-compose -f "$OLD_BTCPAY_DOCKER_COMPOSE" down
fi
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans -t 180
# Give SSH key to BTCPay
if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then

View File

@ -3,4 +3,4 @@
. /etc/profile.d/btcpay-env.sh
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d -t 180

View File

@ -36,4 +36,4 @@ for scriptname in *.sh; do
done
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans -t 180

View File

@ -20,5 +20,5 @@ echo "BTCPAY_HOST=$BTCPAY_HOST" >> "$BTCPAY_ENV_FILE"
echo "ACME_CA_URI=$ACME_CA_URI" >> "$BTCPAY_ENV_FILE"
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d -t 180
fi

View File

@ -3,6 +3,7 @@ version: "3"
services:
clightning_bitcoin:
image: nicolasdorier/clightning:v0.6.2-3
stop_signal: SIGKILL
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:

View File

@ -3,6 +3,7 @@ version: "3"
services:
clightning_litecoin:
image: nicolasdorier/clightning:v0.6.2-3
stop_signal: SIGKILL
container_name: btcpayserver_clightning_litecoin
restart: unless-stopped
environment: