sndev profiles
This commit is contained in:
parent
ec2dcdfd92
commit
08f1db3f68
|
@ -39,15 +39,6 @@ services:
|
|||
db:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
opensearch:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
sn_lnd:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
# s3:
|
||||
# condition: service_healthy
|
||||
# restart: true
|
||||
env_file:
|
||||
- .env.development
|
||||
expose:
|
||||
|
@ -73,12 +64,6 @@ services:
|
|||
app:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
opensearch:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
sn_lnd:
|
||||
condition: service_healthy
|
||||
restart: true
|
||||
env_file:
|
||||
- .env.development
|
||||
volumes:
|
||||
|
@ -89,6 +74,8 @@ services:
|
|||
imgproxy:
|
||||
container_name: imgproxy
|
||||
image: darthsim/imgproxy:v3.23.0
|
||||
profiles:
|
||||
- images
|
||||
healthcheck:
|
||||
test: [ "CMD", "imgproxy", "health" ]
|
||||
interval: 10s
|
||||
|
@ -114,6 +101,8 @@ services:
|
|||
# retries: 10
|
||||
# start_period: 1m
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- images
|
||||
env_file:
|
||||
- .env.development
|
||||
environment:
|
||||
|
@ -131,6 +120,8 @@ services:
|
|||
opensearch:
|
||||
image: opensearchproject/opensearch:2.12.0
|
||||
container_name: opensearch
|
||||
profiles:
|
||||
- search
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -ku admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} --silent --fail localhost:9200/_cluster/health || exit 1"]
|
||||
interval: 10s
|
||||
|
@ -171,6 +162,8 @@ services:
|
|||
image: opensearchproject/opensearch-dashboards:2.12.0
|
||||
container_name: os-dashboard
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- search
|
||||
depends_on:
|
||||
opensearch:
|
||||
condition: service_healthy
|
||||
|
@ -191,6 +184,8 @@ services:
|
|||
image: polarlightning/bitcoind:26.0
|
||||
container_name: bitcoin
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- payments
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "bitcoin-cli -chain=regtest -rpcport=${RPC_PORT} -rpcuser=${RPC_USER} -rpcpassword=${RPC_PASS} getblockchaininfo"]
|
||||
interval: 10s
|
||||
|
@ -248,6 +243,8 @@ services:
|
|||
- LN_NODE_FOR=sn
|
||||
container_name: sn_lnd
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- payments
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "lncli", "getinfo"]
|
||||
interval: 10s
|
||||
|
@ -310,6 +307,8 @@ services:
|
|||
- LN_NODE_FOR=stacker
|
||||
container_name: stacker_lnd
|
||||
restart: unless-stopped
|
||||
profiles:
|
||||
- payments
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "lncli", "getinfo"]
|
||||
interval: 10s
|
||||
|
@ -368,6 +367,8 @@ services:
|
|||
channdler:
|
||||
image: mcuadros/ofelia:latest
|
||||
container_name: channdler
|
||||
profiles:
|
||||
- payments
|
||||
depends_on:
|
||||
- bitcoin
|
||||
- sn_lnd
|
||||
|
|
32
sndev
32
sndev
|
@ -74,12 +74,30 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
docker__compose up --build
|
||||
exit 0
|
||||
profile=''
|
||||
args='--build'
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--profile)
|
||||
profile="$profile --profile $2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
if [ -z "$profile" ]; then
|
||||
if [ -z "$COMPOSE_PROFILES" ]; then
|
||||
profile="--profile images --profile search --profile payments"
|
||||
fi
|
||||
fi
|
||||
|
||||
docker__compose up "$@"
|
||||
docker__compose $profile up $args
|
||||
}
|
||||
|
||||
sndev__help_start() {
|
||||
|
@ -89,7 +107,8 @@ start the sndev env
|
|||
USAGE
|
||||
$ sndev start [OPTIONS]
|
||||
|
||||
OPTIONS"
|
||||
OPTIONS
|
||||
--profile stringArray Set the profile of services to start (\"base\"|$(docker__compose config --profiles | awk '{ printf "%s\"%s\"", (NR==1? "" : "|"), $0} END{ print "" }')) (default all)"
|
||||
|
||||
echo "$help"
|
||||
docker__compose up --help | awk '/Options:/{y=1;next}y'
|
||||
|
@ -107,7 +126,8 @@ stop the sndev env
|
|||
USAGE
|
||||
$ sndev stop [OPTIONS]
|
||||
|
||||
OPTIONS"
|
||||
OPTIONS
|
||||
--profile stringArray Set the profile of services to start ($(docker__compose config --profiles | awk '{ printf "%s\"%s\"", (NR==1? "" : "|"), $0} END{ print "" }')) (default \"*\")"
|
||||
|
||||
echo "$help"
|
||||
docker__compose down --help | awk '/Options:/{y=1;next}y'
|
||||
|
|
Loading…
Reference in New Issue