Skip to content

Commit

Permalink
Read Timetables-API location from env var
Browse files Browse the repository at this point in the history
Use TIMETABLESAPI_HOSTNAME and TIMETABLESAPI_PORT
variables to form the location of the Timetables API service
Use this location in the actions yaml.
  • Loading branch information
culka committed Mar 7, 2024
1 parent 86c2de8 commit bd3cfaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 0 additions & 6 deletions metadata/generic/actions.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions metadata/hsl/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ actions:
- name: combineTimetables
definition:
kind: synchronous
handler: http://jore4-timetablesapi:8080/timetables/combine
handler: "{{HASURA_TIMETABLESAPI_URL}}/timetables/combine"
request_transform:
body:
action: transform
Expand All @@ -14,7 +14,7 @@ actions:
- name: replaceTimetables
definition:
kind: synchronous
handler: http://jore4-timetablesapi:8080/timetables/replace
handler: "{{HASURA_TIMETABLESAPI_URL}}/timetables/replace"
request_transform:
body:
action: transform
Expand All @@ -26,7 +26,7 @@ actions:
- name: toCombineTargetVehicleScheduleFrameId
definition:
kind: ""
handler: http://jore4-timetablesapi:8080/timetables/to-combine
handler: "{{HASURA_TIMETABLESAPI_URL}}/timetables/to-combine"
request_transform:
method: GET
query_params:
Expand All @@ -41,7 +41,7 @@ actions:
- name: toReplaceVehicleScheduleFrameIds
definition:
kind: ""
handler: http://jore4-timetablesapi:8080/timetables/to-replace
handler: "{{HASURA_TIMETABLESAPI_URL}}/timetables/to-replace"
request_transform:
method: GET
query_params:
Expand Down
1 change: 1 addition & 0 deletions scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ HASURA_GRAPHQL_ADMIN_SECRET="$HASURA_ADMIN_SECRET" \
HASURA_GRAPHQL_DATABASE_URL="postgresql://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:5432/${DB_NAME}" \
HASURA_TIMETABLES_DATABASE_URL="postgresql://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOSTNAME}:5432/${DB_TIMETABLES_NAME}" \
HASURA_TIAMAT_SCHEMA_URL="http://${TIAMAT_HOSTNAME:-jore4-tiamat}:${TIAMAT_PORT:-1888}/services/stop_places/graphql" \
HASURA_TIMETABLESAPI_URL="http://${TIMETABLESAPI_HOSTNAME:-jore4-timetablesapi}:${TIMETABLESAPI_PORT:-8080}" \
exec /bin/docker-entrypoint.sh "$@"

0 comments on commit bd3cfaf

Please sign in to comment.