Skip to content

Commit ad2e895

Browse files
Merge pull request #5 from ericpp/1.28.0
Version 1.28.0-beta
2 parents 6849e0e + 37a59b4 commit ad2e895

File tree

3 files changed

+13
-26
lines changed

3 files changed

+13
-26
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ COPY --chmod=755 ./check-mysql.sh /usr/local/bin/
147147
COPY --chmod=755 ./check-pushtx.sh /usr/local/bin/
148148
COPY --chmod=755 ./check-soroban.sh /usr/local/bin/
149149
COPY --chmod=755 ./functions.sh /usr/local/bin/
150-
COPY --chmod=755 ./samourai-dojo/docker/my-dojo/soroban/restart.sh /usr/local/bin/soroban-restart.sh
150+
COPY --chmod=755 ./samourai-dojo/docker/my-dojo/soroban/restart.sh /usr/local/bin/soroban-restart.sh

docker_entrypoint.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ MYSQL_DATABASE=${MYSQL_DATABASE:-"samourai-main"}
2525
MYSQL_USER=${MYSQL_USER:-"samourai"}
2626
MYSQL_PASSWORD=${MYSQL_PASSWORD:-"samourai"}
2727

28-
if [ ! -f /var/lib/mysql/.dojo_db_initialized ]; then
28+
if [ ! -d /var/lib/mysql/mysql ]; then
2929
echo "[i] MySQL data directory not found or not initialized, creating initial DBs"
3030

3131
mkdir -p /var/lib/mysql
@@ -77,23 +77,20 @@ EOF
7777
echo
7878
echo 'MySQL init process done. Starting mysqld...'
7979
echo
80-
81-
# Run initial SQL scripts
82-
sed "1iUSE \`$MYSQL_DATABASE\`;" /docker-entrypoint-initdb.d/2_update.sql | /usr/bin/mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0
83-
84-
for f in /docker-entrypoint-initdb.d/*; do
85-
case "$f" in
86-
*.sql) echo "$0: running $f"; sed "1iUSE \`$MYSQL_DATABASE\`;" "$f" | /usr/bin/mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0; echo ;;
87-
*) echo "$0: ignoring or entrypoint initdb empty $f" ;;
88-
esac
89-
echo
90-
done
91-
92-
touch /var/lib/mysql/.dojo_db_initialized
9380
else
9481
echo "[i] MySQL data directory already initialized, skipping initial DB creation."
9582
fi
9683

84+
# Migrate database tables
85+
echo "[i] Running database migration..."
86+
for f in /docker-entrypoint-initdb.d/*; do
87+
case "$f" in
88+
*.sql) echo "$0: running $f"; sed "1iUSE \`$MYSQL_DATABASE\`;" "$f" | /usr/bin/mysqld --user=mysql --bootstrap --verbose=0 --skip-name-resolve --skip-networking=0; echo ;;
89+
*) echo "$0: ignoring or entrypoint initdb empty $f" ;;
90+
esac
91+
echo
92+
done
93+
9794
# Start mysql
9895
/usr/bin/mysqld_safe --user=mysql --datadir='/var/lib/mysql' &
9996
db_process=$!

manifest.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,12 @@ health-checks:
7070
inject: true
7171
system: false
7272
io-format: yaml
73-
soroban:
74-
name: Soroban
75-
success-message: Soroban P2P relay service is online and ready
76-
type: docker
77-
image: main
78-
entrypoint: 'check-soroban.sh'
79-
args: []
80-
inject: true
81-
system: false
82-
io-format: yaml
8373
soroban:
8474
name: Soroban
8575
success-message: Soroban is running
8676
type: docker
8777
image: main
88-
entrypoint: "check-soroban.sh"
78+
entrypoint: 'check-soroban.sh'
8979
args: []
9080
inject: true
9181
system: false

0 commit comments

Comments
 (0)