Skip to content
Draft
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
11 changes: 11 additions & 0 deletions examples/lmnt/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# LMNT

LMNT_API_KEY=

# (Optional) Restack Cloud

RESTACK_ENGINE_ID=
RESTACK_ENGINE_ADDRESS=
RESTACK_ENGINE_API_KEY=

RESTACK_CLOUD_TOKEN=
1 change: 1 addition & 0 deletions examples/lmnt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
audio/*
44 changes: 44 additions & 0 deletions examples/lmnt/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ------- Image ----------

FROM node:20-bullseye-slim AS installer

RUN apt-get update \
&& apt-get install -y ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY ./package.json ./app/package.json
COPY ./tsconfig.json ./app/tsconfig.json


WORKDIR /app

RUN npm install

# ------- Builder ----------

FROM node:20-bullseye-slim AS builder
WORKDIR /app
COPY --from=installer /app .
COPY ./src ./src

RUN npm run build

# ------- Runner ----------

FROM node:20-bullseye-slim AS runner

RUN apt-get update \
&& apt-get install -y ca-certificates \
&& rm -rf /var/lib/apt/lists/*

RUN addgroup --system --gid 1001 service
RUN adduser --system --uid 1001 service
USER service

WORKDIR /app

COPY --from=builder /app .

ENV NODE_OPTIONS=”--max-old-space-size=4096″

CMD ["node", "dist/services"]
39 changes: 39 additions & 0 deletions examples/lmnt/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "sdk-example-ts",
"version": "1.0.0",
"description": "Basic LMNT example",

"scripts": {
"dev": "tsx watch --include src src/services.ts",
"clean": "rm -rf node_modules",
"build": "tsc --build",
"schedule-hello": "tsx ./scheduleWorkflow.ts helloWorkflow",
"schedule-voices": "tsx ./scheduleWorkflow.ts voicesWorkflow",
"restack-up": "node restack_up.mjs"
},
"nodemonConfig": {
"execMap": {
"ts": "ts-node"
},
"ext": "ts",
"watch": [
"src"
]
},
"dependencies": {
"@restackio/ai": "^0.0.82",
"@temporalio/workflow": "^1.11.2",
"dotenv": "^16.4.5",
"lmnt-node": "^1.2.3",
"zod": "^3.23.8",
"zod-to-json-schema": "^3.23.3",
"tsx": "^4.19.2"
},
"devDependencies": {
"@restackio/restack-sdk-cloud-ts": "^1.0.15",
"@types/node": "^20.16.9",
"ts-node": "^10.9.2",
"typescript": "^5.6.3"

}
}
Loading