forked from lnpay/lnpay-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker.sh
executable file
·64 lines (49 loc) · 1.17 KB
/
docker.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
if [ $1 == "build" ]
then
docker-compose up -d
docker exec lnpay-php composer install
docker exec lnpay-php init --env=Development --overwrite=y
# CRON
docker exec lnpay-php crontab /app/docker/cron/lnpay.cron
# docker exec lnpay-php "cron -f"
# Restart after enable for apache
docker restart lnpay-php
sleep 3
docker exec lnpay-php php yii migrate --interactive=0 --migrationPath=@yii/rbac/migrations
docker exec lnpay-php php yii migrate --interactive=0
# docker exec lnpay-php supervisord
fi
if [ $1 == "start" ]
then
docker-compose up -d
docker exec lnpay-php pkill -f supervisord
docker exec lnpay-php supervisord
fi
if [ $1 == "stop" ]
then
set -e
docker-compose stop
fi
if [ $1 == "destroy" ]
then
set -e
docker-compose down --volumes
rm -rf docker/supervisor/conf.d/lnod_*
fi
# THIS IS EXPERIMENTAL
if [ $1 == "polarup" ]
then
cd tests/polar;
set -e
docker-compose up -d
echo "Waiting 30s for bitcoind and LND to boot..."
sleep 30
fi
# THIS IS EXPERIMENTAL
if [ $1 == "polardown" ]
then
cd tests/polar;
set -e
docker-compose down --volumes
fi