Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Li <[email protected]>
  • Loading branch information
xin-hedera committed Jan 16, 2024
1 parent 4829152 commit aa44355
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/rosetta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@ jobs:
startSecs=$((${firstTimestamp%.*}-60))
startDate=$(date --date="@${startSecs}" -Iseconds -u | grep -o -e '^[0-9T:-]\+')
startDate="${startDate}Z"
echo "STARTDATE=$startdate" >> $GITHUB_ENV
echo "Set importer startDate to $startdate"
echo "STARTDATE=$startDate" >> $GITHUB_ENV
echo "Set importer startDate to $startDate"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Image
uses: docker/build-push-action@v5
with:
build-args: GIT_REF={{ github.sha }}
build-args: GIT_REF=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: ./hedera-mirror-rosetta/container
load: true
provenance: false
push: false
tags: ${{ env.MODULE }}:{{ github.sha }}
tags: ${{ env.MODULE }}:${{ github.sha }}

- name: Importer Configuration
run: echo "${{ secrets.ROSETTA_IMPORTER_CONFIG }}" | base64 -d > /tmp/application_importer.yml
Expand All @@ -66,7 +68,7 @@ jobs:
-e HEDERA_MIRROR_ROSETTA_RESPONSE_MAXTRANSACTIONSINBLOCK=4 \
-v /tmp/application_importer.yml:/app/importer/application.yml \
-v /tmp/application_rosetta.yml:/app/rosetta/application.yml \
-p 5700:5700 "${MODULE}:{{ github.sha }}")
-p 5700:5700 "${MODULE}:${{ github.sha }}")
echo "ONLINE_CONTAINER_ID=$ONLINE_CONTAINER_ID" >> $GITHUB_ENV
# - name: Run Mirror Node in Offline Mode
Expand All @@ -85,7 +87,7 @@ jobs:
- name: Wait for Mirror Node to start syncing
run: ./scripts/wait-for-mirror-node.sh
env:
MAX_WAIT_SECONDS: 240
MAX_WAIT_SECONDS: 900

# - name: Rosetta CLI Configuration
# run: |
Expand Down
2 changes: 2 additions & 0 deletions hedera-mirror-rosetta/container/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ function init_db() {
if [[ -f "${PGDATA}/PG_VERSION" ]]; then
# relink the config dir just in case it's a newly created container with existing mapped /data dir
ln -sTf ${PGDATA} ${PG_CLUSTER_CONF}
su postgres -c 'cp /app/pg_hba.conf ${PGDATA}'
echo "Database is already initialized"

init_temp_schema
return
fi
Expand Down
2 changes: 1 addition & 1 deletion hedera-mirror-rosetta/container/pg_hba.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# TYPE DATABASE USER ADDRESS METHOD
local all postgres peer
local all all trust
host all all 127.0.0.1/32 scram-sha-256
host all all ::1/128 scram-sha-256
host all all 172.17.0.0/16 scram-sha-256

0 comments on commit aa44355

Please sign in to comment.