forked from alekswithakayy/dolos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
067422c
commit dbb076b
Showing
3 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
#! /bin/sh | ||
#!/bin/sh | ||
|
||
echo "Starting dolos bootstrap" | ||
echo "Starting dolos bootstrap from snapshot" | ||
|
||
# Create empty WAL | ||
dolos bootstrap relay --config /etc/dolos.toml && \ | ||
# Now you can run | ||
dolos daemon --config /etc/dolos.toml | ||
# Run the bootstrap command and capture the output | ||
BOOTSTRAP_OUTPUT=$(dolos bootstrap snapshot --variant full --config /etc/dolos.toml) | ||
|
||
# Check if the output indicates existing data | ||
if echo "$BOOTSTRAP_OUTPUT" | grep -q "found existing data, skipping bootstrap"; then | ||
echo "Bootstrap skipped due to existing data, skipping ledger removal and rebuild" | ||
else | ||
echo "Removing ledger and rebuilding" | ||
rm -rf /var/data/ledger | ||
dolos doctor rebuild-ledger | ||
fi | ||
|
||
# Start the dolos daemon | ||
dolos daemon --config /etc/dolos.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: dolos-app-svc | ||
namespace: dolos | ||
spec: | ||
type: LoadBalancer | ||
loadBalancerIP: 34.67.87.74 | ||
selector: | ||
app: dolos-app | ||
ports: | ||
- protocol: TCP | ||
port: 80 # External port | ||
targetPort: 50051 # Port used by the container |