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