Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,13 @@ docker run -p 4000:4000 dispatchai-backend:dev
docker compose up api
```

To run the docker using capet's config
run
'''
docker compose up
'''
remember to set up the correct env.local

## 🔗 Key Integrations

### Twilio Voice API
Expand Down
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3.9"

services:
api:
build:
context: .
dockerfile: Dockerfile
env_file: .env.local
ports:
- "4000:4000"
depends_on:
- redis
restart: unless-stopped

redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"

volumes:
mongo-data:
24 changes: 24 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Stage 1 – Build
FROM node:20-alpine3.22 AS builder
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm fetch
COPY . .
RUN pnpm install --offline \
&& pnpm build \
&& pnpm prune --prod

# Stage 2 – Runtime
FROM node:20-alpine3.22 AS runtime
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm fetch && pnpm install --prod --offline
# 仅复制运行所需文件
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/templates ./templates

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add user


ENV NODE_ENV=production \
PORT=4000
EXPOSE 4000
CMD ["node", "dist/src/main"]
26 changes: 20 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
{

"pnpm": {
"overrides": {
"jws": "3.2.3",
"glob": "11.1.0",
"qs": "6.14.2",
"ajv": "8.18.0",
"js-yaml": "4.1.1",
"lodash": "4.17.23",
"webpack": "5.104.1",
"diff": "5.2.2",
"brace-expansion": "2.0.2"
}
},
"dependencies": {
"@aws-sdk/client-ses": "^3.929.0",
"@aws-sdk/client-ses": "^3.974.0",
"@nestjs/axios": "^4.0.0",
"@nestjs/common": "^11.0.11",
"@nestjs/config": "^4.0.1",
"@nestjs/config": "^4.0.3",
"@nestjs/core": "^11.0.11",
"@nestjs/jwt": "^11.0.0",
"@nestjs/mapped-types": "^2.1.0",
"@nestjs/mongoose": "^11.0.1",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.0.11",
"@nestjs/swagger": "^11.0.6",
"@nestjs/platform-express": "^11.1.16",
"@nestjs/swagger": "^11.2.6",
"@types/cookie-parser": "^1.4.9",
"@types/passport-google-oauth20": "^2.0.16",
"axios": "^1.9.0",
"axios": "^1.13.5",
"bcryptjs": "^3.0.2",
"body-parser": "^2.2.0",
"body-parser": "^2.2.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"cookie-parser": "^1.4.7",
Expand Down
Loading