k-l-lambda commited on
Commit
95c4896
·
1 Parent(s): 8edd547

update: export from starry-refactor 2026-02-21 19:36

Browse files
Files changed (3) hide show
  1. Dockerfile +2 -5
  2. docker-entrypoint.sh +5 -10
  3. seed-data.sql.gz +3 -0
Dockerfile CHANGED
@@ -123,11 +123,8 @@ COPY --chown=node backend/python-services/ ./backend/python-services/
123
  # --- Supervisord config ---
124
  COPY --chown=node supervisord.conf ./supervisord.conf
125
 
126
- # --- Example score for seeding ---
127
- COPY --chown=node example-score/ ./example-score/
128
- COPY --chown=node seed-example.sh ./seed-example.sh
129
- COPY --chown=node seed-solutions.sql ./seed-solutions.sql
130
- RUN chmod +x seed-example.sh
131
 
132
  # --- Config files ---
133
  COPY --chown=node docker-entrypoint.sh ./docker-entrypoint.sh
 
123
  # --- Supervisord config ---
124
  COPY --chown=node supervisord.conf ./supervisord.conf
125
 
126
+ # --- Example score seed data (pre-computed score + regulation solutions) ---
127
+ COPY --chown=node seed-data.sql.gz ./seed-data.sql.gz
 
 
 
128
 
129
  # --- Config files ---
130
  COPY --chown=node docker-entrypoint.sh ./docker-entrypoint.sh
docker-entrypoint.sh CHANGED
@@ -229,11 +229,11 @@ cd /home/node/app/backend/omr-service
229
  DB_HOST=127.0.0.1 DB_PORT=5432 DB_NAME=starry_omr DB_USER=node DB_PASSWORD= \
230
  npx tsx src/db/migrate.ts 2>&1 || echo 'Warning: Migration failed or skipped'
231
 
232
- # Load pre-computed regulation solutions for example score
233
- if [ -f /home/node/app/seed-solutions.sql ]; then
234
- echo 'Loading seed regulation solutions...'
235
- /usr/lib/postgresql/15/bin/psql -h 127.0.0.1 -p 5432 -U node -d starry_omr \
236
- -f /home/node/app/seed-solutions.sql 2>&1 | tail -1
237
  fi
238
 
239
  # ── Start cluster-server (port 3999) ──
@@ -263,11 +263,6 @@ for i in $(seq 1 30); do
263
  sleep 1
264
  done
265
 
266
- # ── Seed example score (background — waits for ML predictors internally) ──
267
- if [ -f /home/node/app/seed-example.sh ]; then
268
- /home/node/app/seed-example.sh &
269
- fi
270
-
271
  # ── Start nginx (port 7860, foreground) ──
272
  echo 'Starting nginx on port 7860...'
273
  exec nginx -g 'daemon off;'
 
229
  DB_HOST=127.0.0.1 DB_PORT=5432 DB_NAME=starry_omr DB_USER=node DB_PASSWORD= \
230
  npx tsx src/db/migrate.ts 2>&1 || echo 'Warning: Migration failed or skipped'
231
 
232
+ # Seed example score data + pre-computed regulation solutions
233
+ if [ -f /home/node/app/seed-data.sql.gz ]; then
234
+ echo 'Loading seed data (example score + regulation solutions)...'
235
+ zcat /home/node/app/seed-data.sql.gz | \
236
+ /usr/lib/postgresql/15/bin/psql -h 127.0.0.1 -p 5432 -U node -d starry_omr 2>&1 | tail -1
237
  fi
238
 
239
  # ── Start cluster-server (port 3999) ──
 
263
  sleep 1
264
  done
265
 
 
 
 
 
 
266
  # ── Start nginx (port 7860, foreground) ──
267
  echo 'Starting nginx on port 7860...'
268
  exec nginx -g 'daemon off;'
seed-data.sql.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc6673ee268a313d9fcba298eb28923f9545ecb3b808960dfd3c7480379c526f
3
+ size 4332555