Skip to content

Commit

Permalink
Updating dockerfile and exposed port
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWoodard committed Apr 29, 2024
1 parent ca16dea commit 70ff359
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
FROM node:20
FROM node:20 as builder

WORKDIR /app
COPY package.json ./
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
EXPOSE 8080
RUN yarn build

FROM node:20-slim

WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/lib ./lib
COPY package.json yarn.lock ./

EXPOSE 80
CMD [ "node", "lib/index.js" ]
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import helmet from "helmet";

dotenv.config();

const port = process.env.PORT || 8080;
const port = process.env.PORT || 80;
const app = express();

console.log("Starting Liquidator");
Expand Down Expand Up @@ -56,7 +56,6 @@ chains.forEach((chain) => {
});

app.get("/liquidator_readiness_check", (req, res) => {
console.log("Received readiness check");
res.send("OK");
});

Expand Down

0 comments on commit 70ff359

Please sign in to comment.