Skip to content

Commit

Permalink
Merge pull request #16 from decentraland/fix/troubleshoot-aws-path
Browse files Browse the repository at this point in the history
fix: change to aws cli v1
  • Loading branch information
charly-bg authored Nov 12, 2024
2 parents db0229b + 2b44b93 commit 38b7366
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ RUN chmod +x /squid/indexer.sh
RUN echo -e "loglevel=silent\\nupdate-notifier=false" > /squid/.npmrc
RUN npm i -g @subsquid/cli@latest && mv $(which sqd) /usr/local/bin/sqd

# Install jq and AWS CLI
RUN apk update && apk add --no-cache tini postgresql-client curl jq unzip \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -rf awscliv2.zip aws
# Install jq and AWS CLI v1
RUN apk update && apk add --no-cache tini postgresql-client curl jq python3 py3-pip \
&& pip3 install awscli \
&& rm -rf /var/cache/apk/*

ENV ETH_PROMETHEUS_PORT 3000
ENV POLYGON_PROMETHEUS_PORT 3001
Expand Down
7 changes: 0 additions & 7 deletions indexer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@ echo "Generated user: $NEW_DB_USER"
# Set PGPASSWORD to handle password prompt
export PGPASSWORD=$DB_PASSWORD

# Debug issue
echo "Initial PATH: $PATH"
which aws || echo "AWS CLI not found in PATH"
command -v aws || echo "AWS CLI not found with command"
type -P aws || echo "AWS CLI not found with type"

# Fetch metadata and extract service name in one command
export PATH="$PATH:$(dirname $(which aws))"
SERVICE_NAME=$(aws ecs describe-tasks \
--cluster "$(curl -s http://169.254.170.2/v4/task | jq -r '.Cluster')" \
--tasks "$(curl -s http://169.254.170.2/v4/task | jq -r '.TaskARN' | awk -F'/' '{print $NF}')" \
Expand Down

0 comments on commit 38b7366

Please sign in to comment.