-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ecs for other liquidator bots and fixed all the other errors includin…
…g upstack err
- Loading branch information
amish kohli
authored and
amish kohli
committed
Nov 13, 2024
1 parent
720f428
commit 641cd2c
Showing
12 changed files
with
200 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Base image: Use a standard Node.js image for ECS instead of Lambda-specific | ||
FROM node:20 as build | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y git | ||
|
||
# Enable Yarn and set the stable version | ||
RUN corepack enable | ||
RUN yarn set version stable | ||
|
||
ENV HOME=/tmp/build \ | ||
PATH=/tmp/build/node_modules/.bin:./node_modules/.bin:${PATH} | ||
|
||
WORKDIR /tmp/build | ||
|
||
ARG TEMP_DEPS_DIR | ||
|
||
ARG UPTIME_PYTH_UPDATER_API | ||
ENV UPTIME_PYTH_UPDATER_API=$UPTIME_PYTH_UPDATER_API | ||
|
||
# Copy necessary files to leverage Docker cache | ||
COPY .yarn /tmp/build/.yarn/ | ||
COPY .yarnrc.yml /tmp/build/ | ||
|
||
COPY package.json /tmp/build/ | ||
COPY packages/sdk/package.json /tmp/build/packages/sdk/ | ||
COPY packages/types/package.json /tmp/build/packages/types/ | ||
COPY packages/chains/package.json /tmp/build/packages/chains/ | ||
COPY packages/bots/pyth-updater/package.json /tmp/build/packages/bots/pyth-updater/ | ||
COPY yarn.lock /tmp/build/ | ||
|
||
# Install dependencies | ||
RUN yarn install --inline-builds --mode=skip-build | ||
|
||
# Copy source code | ||
COPY packages/sdk /tmp/build/packages/sdk | ||
COPY packages/types /tmp/build/packages/types | ||
COPY packages/chains /tmp/build/packages/chains | ||
COPY packages/bots/pyth-updater /tmp/build/packages/bots/pyth-updater | ||
|
||
# Build the project | ||
RUN yarn build:deploy:pyth-updater | ||
|
||
# Production stage | ||
FROM node:20 as runtime | ||
|
||
ENV NODE_ENV=production | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the build from the previous stage | ||
COPY --from=build /tmp/build /usr/src/app | ||
|
||
# Command to run your bot in ECS | ||
CMD ["node", "packages/bots/pyth-updater/build/src/run.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters