Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit ee25c36

Browse files
committed
changed dfx network
Signed-off-by: Dominic Wörner <dom.woe@gmail.com>
1 parent 08fa61c commit ee25c36

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ jobs:
6969
with:
7070
files_yaml: |
7171
frontend:
72+
# Docker-deployed frontends (actively built in production)
7273
- 'src/btc_vault_app/**'
7374
- 'src/btc_vault_landing/**'
7475
- 'examples/apps/staking/frontend/**'
7576
- 'examples/apps/swap/frontend/**'
77+
# Local development frontend (dfx.json canister, not in Docker build)
78+
- 'src/btc_vault_frontend_v2/**'
7679
backend:
7780
- 'src/btc_vault_backend/**'
7881
- 'examples/unlock_modules/**'

docker-compose.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ volumes:
1515
mempool-db: {}
1616
mempool-redis: {}
1717
dfx-data: {}
18+
project-dfx-data: {}
1819
landing-dist: {}
1920
app-dist: {}
2021
staking-frontend-dist: {}
@@ -371,8 +372,11 @@ services:
371372
- ./:/app
372373
# Override dfx.json so the bitcoin adapter connects to the bitcoind container
373374
- ./docker/dfx/dfx.json:/app/dfx.json:ro
374-
# Persist .dfx state for faster rebuilds
375+
# Persist dfx configuration (identities, wallets, global settings)
375376
- dfx-data:/root/.config/dfx
377+
# Persist project .dfx directory for full canister state persistence
378+
# With persistent network type, this preserves canister IDs AND canister state
379+
- project-dfx-data:/app/.dfx
376380
# Optional: mount host-provided identities (exported PEMs) into /secrets
377381
- ./secrets:/secrets:ro
378382
# Share the built frontend artifacts with the nginx containers

docker/dfx/dfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"networks": {
9494
"local": {
9595
"bind": "0.0.0.0:4943",
96-
"type": "ephemeral"
96+
"type": "persistent"
9797
}
9898
},
9999
"output_env_file": ".env",

docker/dfx/entrypoint.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,15 @@ pkill -f pocket-ic || true
367367
# Start replica (using dfx.json network configuration)
368368
echo "🚀 Starting local replica..."
369369
if [ "$FORCE_CLEAN_START" = "true" ]; then
370-
echo "🧹 Starting with --clean flag (will destroy existing state)"
370+
echo "🧹 Starting with --clean flag (will destroy all existing state)"
371371
DFX_CONFIG_ROOT=/app dfx start --clean --background
372372
else
373-
echo "♻️ Starting without --clean (preserving existing state if available)"
373+
echo "♻️ Starting without --clean (preserving all canister state and data)"
374+
# With persistent network type, this preserves:
375+
# - Canister IDs
376+
# - Canister state (smart contract data)
377+
# - Identity/wallet configuration
378+
# This enables true incremental deployments!
374379
DFX_CONFIG_ROOT=/app dfx start --background
375380
fi
376381

0 commit comments

Comments
 (0)