commit
9a1de666fd
25
README.md
25
README.md
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
Launch a fully featured SN development environment in a single command.
|
Launch a fully featured SN development environment in a single command.
|
||||||
|
|
||||||
```txt
|
```sh
|
||||||
$ ./sndev start
|
$ ./sndev start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -38,13 +38,32 @@ Go to [localhost:3000](http://localhost:3000).
|
||||||
|
|
||||||
Start the development environment
|
Start the development environment
|
||||||
|
|
||||||
```txt
|
```sh
|
||||||
$ ./sndev start
|
$ ./sndev start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
By default all services will be run. If you want to exclude specific services from running, set `COMPOSE_PROFILES` to use one or more of `minimal|images|search|payments`. To only run mininal services without images, search, or payments:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ COMPOSE_PROFILES=minimal ./sndev start
|
||||||
|
```
|
||||||
|
|
||||||
|
Or, as I would recommend:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ export COMPOSE_PROFILES=minimal
|
||||||
|
$ ./sndev start
|
||||||
|
```
|
||||||
|
|
||||||
|
To run with images and payments services:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ COMPOSE_PROFILES=images,payments ./sndev start
|
||||||
|
```
|
||||||
|
|
||||||
View all available commands
|
View all available commands
|
||||||
|
|
||||||
```txt
|
```sh
|
||||||
$ ./sndev help
|
$ ./sndev help
|
||||||
|
|
||||||
888
|
888
|
||||||
|
|
|
@ -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
|
||||||
|
|
6
sndev
6
sndev
|
@ -9,7 +9,11 @@ docker__compose() {
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CURRENT_UID=$(id -u) CURRENT_GID=$(id -g) command docker compose --env-file .env.development "$@"
|
if [ -z "$COMPOSE_PROFILES" ]; then
|
||||||
|
COMPOSE_PROFILES="images,search,payments"
|
||||||
|
fi
|
||||||
|
|
||||||
|
CURRENT_UID=$(id -u) CURRENT_GID=$(id -g) COMPOSE_PROFILES=$COMPOSE_PROFILES command docker compose --env-file .env.development "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
docker__exec() {
|
docker__exec() {
|
||||||
|
|
Loading…
Reference in New Issue