attempt a Docker file but it fails on step 5
This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
FROM node:22-alpine
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@11.4.0 --activate
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json pnpm-lock.yaml pnpm.yaml ./
|
||||||
|
RUN pnpm install --prod
|
||||||
|
|
||||||
|
COPY src ./src
|
||||||
|
COPY tsconfig.json ./
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
ENV PORT=3000
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "--import", "tsx/esm", "src/index.ts"]
|
||||||
11
README.md
11
README.md
@@ -20,11 +20,20 @@ Set `NODE_ENV=test-local` in `.env` to bypass JWT expiry verification during loc
|
|||||||
|
|
||||||
## Production
|
## Production
|
||||||
|
|
||||||
|
Runs TypeScript directly via `tsx` (no compile step).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm install --omit=dev
|
pnpm install --prod
|
||||||
pnpm start
|
pnpm start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or with Docker:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -t notification-wakeup-service .
|
||||||
|
docker run -e FIREBASE_SERVICE_ACCOUNT_JSON='...' -p 3000:3000 notification-wakeup-service
|
||||||
|
```
|
||||||
|
|
||||||
Required environment variables:
|
Required environment variables:
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
|
|||||||
19
package.json
19
package.json
@@ -3,24 +3,25 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"packageManager": "pnpm@11.4.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsx watch src/index.ts",
|
"dev": "tsx watch src/index.ts",
|
||||||
"start": "tsx src/index.ts",
|
"start": "tsx src/index.ts",
|
||||||
"build": "tsc"
|
"build": "tsc"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@peculiar/asn1-ecc": "^2.3.8",
|
"@peculiar/asn1-ecc": "^2.7.0",
|
||||||
"@peculiar/asn1-schema": "^2.3.8",
|
"@peculiar/asn1-schema": "^2.7.0",
|
||||||
"cbor-x": "^1.5.9",
|
"cbor-x": "^1.6.4",
|
||||||
"did-jwt": "^7.4.7",
|
"did-jwt": "^7.4.7",
|
||||||
"did-resolver": "^4.1.0",
|
"did-resolver": "^4.1.0",
|
||||||
"express": "^5.1.0",
|
"express": "^5.2.1",
|
||||||
"firebase-admin": "^13.9.0"
|
"firebase-admin": "^13.10.0",
|
||||||
|
"tsx": "^4.22.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.6",
|
||||||
"@types/node": "^22.10.0",
|
"@types/node": "^22.19.19",
|
||||||
"tsx": "^4.19.2",
|
"typescript": "^5.9.3"
|
||||||
"typescript": "^5.7.2"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
2527
pnpm-lock.yaml
generated
2527
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user