Skip to content

Commit a0d3bf4

Browse files
committed
adding configurable network name
this is relevant for porting to umbrel
1 parent f3aeb95 commit a0d3bf4

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

compose-files/common.yaml

+7-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- POSTGRES_PASSWORD=${PG_PASSWORD:-postgres}
1111
networks:
12-
- stacks-blockchain
12+
- default
1313
profiles:
1414
- event-replay
1515
- stacks-blockchain
@@ -23,7 +23,7 @@ services:
2323
env_file:
2424
- ${SCRIPTPATH}/.env
2525
networks:
26-
- stacks-blockchain
26+
- default
2727
depends_on:
2828
- stacks-blockchain-api
2929
profiles:
@@ -39,22 +39,20 @@ services:
3939
image: hirosystems/stacks-blockchain-api:${STACKS_BLOCKCHAIN_API_VERSION:-latest}
4040
container_name: stacks-blockchain-api
4141
restart: always
42-
# volumes:
43-
# - ${SCRIPTPATH}/persistent-data/bns-data:/bns-data
44-
# - ${SCRIPTPATH}/persistent-data/mainnet/event-replay:/tmp/event-replay
4542
ports:
4643
- ${API_STACKS_BLOCKCHAIN_API_PORT_LOCAL:-3999}:${API_STACKS_BLOCKCHAIN_API_PORT:-3999}
4744
env_file:
4845
- ${SCRIPTPATH}/.env
4946
networks:
50-
- stacks-blockchain
47+
- default
5148
depends_on:
5249
- postgres
5350
profiles:
5451
- event-replay
5552
- stacks-blockchain
5653
command: ["npm", "run", "start"]
5754
networks:
58-
stacks-blockchain:
59-
driver: bridge
60-
name: stacks
55+
default:
56+
name: ${DOCKER_NETWORK}
57+
ipam:
58+
driver: default

compose-files/extra-services/bns.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ services:
1212
environment:
1313
- USER_ID=${USER_ID}
1414
networks:
15-
- stacks-blockchain
15+
- default
1616
profiles:
1717
- bns
1818
command: sh -c "/scripts/setup-bns.sh"
19-
networks:
20-
stacks-blockchain:
21-
driver: bridge
22-
name: stacks

compose-files/extra-services/proxy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
ports:
88
- ${NGINX_PROXY_PORT:-80}:80
99
networks:
10-
- stacks-blockchain
10+
- default
1111
profiles:
1212
- stacks-blockchain
1313
volumes:

manage.sh

+2
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,9 @@ fi
979979

980980
USER_ID=$(id -u "$(whoami)")
981981
export USER_ID="${USER_ID}"
982+
export DOCKER_NETWORK="${DOCKER_NETWORK}"
982983
${VERBOSE} && log "Exporting USER_ID: ${USER_ID}"
984+
${VERBOSE} && log "Exporting DOCKER_NETWORK: ${DOCKER_NETWORK}"
983985

984986
# loop through the args and try to determine what options we have
985987
# - simple check for logs/status/upgrade/bns since these are not network dependent

sample.env

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# VERBOSE=true
2+
DOCKER_NETWORK=stacks
23
###############################
34
## Stacks Blockchain API
45
##

0 commit comments

Comments
 (0)