-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
687b237
commit df92bbb
Showing
7 changed files
with
132 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +1,23 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD node --import=extensionless/register build/server/workers/commonwealthConsumer/commonwealthConsumer.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD node --import=extensionless/register build/server/workers/evmChainEvents/startEvmPolling.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD node --import=extensionless/register build/server/workers/knock/knockWorker.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD node --import=extensionless/register build/server/workers/messageRelayer/messageRelayer.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD node --import=extensionless/register build/server/scripts/releasePhaseEnvCheck.js && \ | ||
npx sequelize-cli db:migrate --config server/sequelize.json && \ | ||
node --import=extensionless/register build/server/scripts/purgeCloudflareCache.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
FROM base | ||
FROM node:20-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
|
||
FROM base AS build | ||
## needed for node-gyp to build | ||
RUN apt-get update && \ | ||
apt-get install -y python3 make gcc g++ | ||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
RUN pnpm deploy --filter=commonwealth --prod /prod/commonwealth | ||
RUN mv /usr/src/app/packages/commonwealth/build /prod/commonwealth/build | ||
|
||
FROM base AS commonwealth | ||
ENV NODE_ENV=production | ||
COPY --from=build /prod/commonwealth /prod/commonwealth | ||
WORKDIR /prod/commonwealth | ||
RUN apt-get update && apt-get install -y curl # Needed for heroku | ||
ENV PORT=$PORT | ||
CMD NODE_ENV=production node --import=extensionless/register --enable-source-maps ./build/service1-server.js |