Skip to content

Commit 9fe0cec

Browse files
committed
Add support in development.sh for local Tiamat instance
1 parent f071762 commit 9fe0cec

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

scripts/development.sh

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ INFRALINKS_URL="https://stjore4dev001.blob.core.windows.net/jore4-ui/2025-09-24-
2323
TRAM_INFRALINKS_URL="https://stjore4dev001.blob.core.windows.net/jore4-ui/tram_infraLinks_2026-01-28.sql"
2424

2525
DOCKER_TESTDB_IMAGE="jore4-testdb"
26-
DOCKER_IMAGES=("jore4-idp" "jore4-auth" "jore4-hasura" "jore4-mbtiles" "jore4-mapmatchingdb" "jore4-mapmatching" "jore4-hastus" "jore4-tiamat" "jore4-timetablesapi")
26+
DOCKER_TIAMAT_IMAGE="jore4-tiamat"
27+
DOCKER_IMAGES=("jore4-idp" "jore4-auth" "jore4-hasura" "jore4-mbtiles" "jore4-mapmatchingdb" "jore4-mapmatching" "jore4-hastus" "jore4-timetablesapi")
2728
DOCKER_E2E_IMAGES=("jore4-hasura-e2e" "jore4-tiamat-e2e" "jore4-timetablesapi-e2e" "jore4-testdb-e2e")
2829

2930
ROUTES_DB_CONNECTION_STRING=postgresql://dbadmin:adminpassword@localhost:5432/jore4e2e
@@ -221,7 +222,7 @@ start_dependencies() {
221222
additional_images+=("${DOCKER_E2E_IMAGES[@]}")
222223
fi
223224

224-
start_docker_containers "$DOCKER_TESTDB_IMAGE" "${DOCKER_IMAGES[@]}" "${additional_images[@]}"
225+
start_docker_containers "$DOCKER_TESTDB_IMAGE" "${DOCKER_IMAGES[@]}" "$DOCKER_TIAMAT_IMAGE" "${additional_images[@]}"
225226

226227
# Use port 3010 for tiamat and 3110 for tiamat-e2e
227228

@@ -334,6 +335,13 @@ setup_environment() {
334335
additional_images+=("${DOCKER_E2E_IMAGES[@]}")
335336
fi
336337

338+
if [[ $1 = "localtiamat" ]]; then
339+
echo "Using locally running Tiamat instance, you should start the java application now
340+
and press enter when it is ready to accept connections..."
341+
read -r
342+
else
343+
additional_images+=("$DOCKER_TIAMAT_IMAGE")
344+
fi
337345
start_docker_containers "${DOCKER_IMAGES[@]}" "${additional_images[@]}"
338346

339347
if [ "$INCLUDE_E2E" = true ]; then
@@ -342,7 +350,7 @@ setup_environment() {
342350
./scripts/seed-municipalities-and-fare-zones.sh 3110
343351
fi
344352

345-
if [[ $1 = "test" ]]; then
353+
if [[ $1 = "test" || $1 = "localtiamat" ]]; then
346354
cd ./test-db-manager
347355
yarn build
348356
# Stop registry dumps do not include any terminal data or trams, use the seed data to insert them
@@ -402,6 +410,19 @@ print_usage() {
402410
the BUNDLE_REF environment variable. By default, the latest version is
403411
downloaded.
404412
413+
setup:localtiamat
414+
Start dependencies and seed databases with dump data, but use a locally running
415+
Tiamat instance instead of the one downloaded from Azure Container Registry.
416+
417+
If the Digitransit subscription key has not yet been fetched (stored in
418+
ui/.env.local), you will need to set the AZ_HTTPS_PROXY environment
419+
variable. For more information, see the README.md file.
420+
421+
You can change which version of the Docker Compose bundle is downloaded by
422+
passing a commit reference to the jore4-docker-compose-bundle repository via
423+
the BUNDLE_REF environment variable. By default, the latest version is
424+
downloaded.
425+
405426
infralinks:download
406427
Downloads the infrastructure links seed data SQL file (infraLinks.sql) from Azure
407428
Blob Storage.
@@ -454,6 +475,10 @@ setup:test)
454475
setup_environment test
455476
;;
456477

478+
setup:localtiamat)
479+
setup_environment localtiamat
480+
;;
481+
457482
infralinks:download)
458483
download_infralinks
459484
;;

0 commit comments

Comments
 (0)