Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
82 changes: 0 additions & 82 deletions .github/workflows/ci-cd.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/trigger.yml

This file was deleted.

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:
34 changes: 34 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Stage 1 - Build
FROM node:20-alpine AS builder

WORKDIR /app

RUN corepack enable

COPY package.json pnpm-lock.yaml ./
RUN pnpm fetch

COPY . .

RUN pnpm install --offline \
&& pnpm build \
&& pnpm prune --prod


# Stage 2 - Runtime
FROM gcr.io/distroless/nodejs20 AS runtime

WORKDIR /app

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/templates ./templates

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

USER nonroot

CMD [ "dist/src/main.js"]
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"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",
"class-validator": "^0.14.4",
"cookie-parser": "^1.4.7",
"dotenv": "^16.5.0",
"express": "^5.1.0",
Expand Down
Loading