Skip to content

Commit 1e6bb9b

Browse files
committed
init
0 parents  commit 1e6bb9b

10 files changed

Lines changed: 16563 additions & 0 deletions

File tree

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
LIT_NETWORK=naga
2+
LIT_NETWORK=naga
3+
LIT_ETHEREUM_PRIVATE_KEY=0x84b60a26b73df64168b2a6b7a7583b71c4450282712070683a87e0ffe4507d37
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Docker Image (and push to registry if main or staging)
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Setup buildx
20+
uses: docker/setup-buildx-action@v3
21+
with:
22+
platforms: linux/amd64,linux/arm64
23+
24+
- name: Docker meta
25+
id: meta
26+
uses: docker/metadata-action@v5
27+
with:
28+
images: ${{ secrets.DOCKER_USERNAME }}/project-claim-api
29+
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: 22
33+
34+
- name: Login to Docker Hub
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ secrets.DOCKER_USERNAME }}
38+
password: ${{ secrets.DOCKER_PASSWORD }}
39+
40+
- name: Build and push Docker image
41+
uses: docker/build-push-action@v6
42+
with:
43+
context: .
44+
file: ./Dockerfile.dockerhub
45+
push: ${{ github.event_name != 'pull_request' }}
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}
48+
platforms: linux/arm64,linux/amd64

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.lit-auth-storage

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:24
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm ci
7+
8+
COPY . .
9+
RUN npm run build
10+
11+
EXPOSE 3100
12+
13+
CMD ["node", "dist/index.js"]

Dockerfile.dockerhub

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:22
2+
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm ci
7+
8+
COPY . .
9+
10+
ARG SKIP_BUILD=false
11+
12+
RUN if [ "$SKIP_BUILD" = "false" ]; then npm run build; fi
13+
14+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)