Skip to content

Commit

Permalink
PM-1118: rework Dockerfile. Adjust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
simisimis committed Jan 31, 2024
1 parent a3c2974 commit 422c35e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
registry: ${{ env.ECR_REPOSITORY_URL}}
repository: ${{ env.ECR_REPOSITORY_NAME }}
tag: ${{ env.TAG }}
- name: 🏗️ Install Dependencies
run: |
npm install
- name: 📦 Compile Mina Transactions Generator
run: |
npm run build
- name: 🛠️ Build Mina Transactions Generator Docker Image
if: steps.checktag.outputs.tag == 'not found'
run: DOCKER_BUILDKIT=1 docker build -t ${{ env.ECR_REPOSITORY_URL}}/${{ env.ECR_REPOSITORY_NAME }}:${{ env.TAG }} .
Expand Down
19 changes: 15 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
FROM node:alpine
FROM node:alpine as build

WORKDIR /usr/src/app

COPY package*.json ./
COPY package*.json tsconfig.json ./
COPY src ./src

RUN npm install && npm run build

FROM node:alpine

WORKDIR /app

COPY --from=build /usr/src/app/build ./

COPY --from=build /usr/src/app/package*.json ./

COPY ./build ./
RUN npm install

CMD ["node", "./src/entry.js"]
CMD ["node", "./entry.js"]
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "es2022",
"lib": ["dom", "esnext"],
"outDir": "./build",
"rootDir": ".",
"rootDir": "./src",
"strict": true,
"strictPropertyInitialization": false, // to enable generic constructors, e.g. on CircuitValue
"skipLibCheck": true,
Expand Down

0 comments on commit 422c35e

Please sign in to comment.