Skip to content

Commit afead3c

Browse files
committed
dockerfile (only networking to studio wip)
1 parent 69feb04 commit afead3c

File tree

3 files changed

+17
-816
lines changed

3 files changed

+17
-816
lines changed

examples/express-together-llamaindex/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Build stage
2-
FROM node:20-bullseye-slim AS builder
2+
FROM node:20-bullseye AS builder
33

44
WORKDIR /app
55

66
# Install pnpm
77
RUN npm install -g pnpm
88

9+
# Copy package files and env file if it exists
10+
COPY package*.json .env* ./
11+
912
# Copy package files
1013
COPY package*.json ./
1114

@@ -20,7 +23,7 @@ COPY . .
2023
RUN pnpm run build
2124

2225
# Production stage
23-
FROM node:20-bullseye-slim
26+
FROM node:20-bullseye
2427

2528
WORKDIR /app
2629

@@ -36,4 +39,4 @@ RUN pnpm install --prod
3639

3740
EXPOSE 8000
3841

39-
CMD ["node", "dist/server.js"]
42+
CMD ["pnpm", "tsx", "dist/server.js"]

examples/express-together-llamaindex/package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "restack-examples-ts-express",
2+
"name": "restack-examples-ts-express-together-llamaindex",
33
"version": "0.0.1",
44
"description": "Basic Express example",
55
"scripts": {
66
"dev": "tsx watch --include src src/server.ts",
77
"clean": "rm -rf node_modules",
8-
"docker:build": "docker build -t restack-express .",
9-
"docker:run": "docker run -p 8000:8000 restack-express",
10-
"docker:dev": "pnpm docker:build && pnpm docker:run",
11-
"restack-up": "node restack_up.mjs"
8+
"build": "tsc --build",
9+
"docker:build": "docker build -t restack-express-together-llamaindex .",
10+
"docker:run": "docker run -p 8000:8000 --network restack-net --env-file .env --env RESTACK_ENGINE_ADDRESS=http://localhost:6233 restack-express-together-llamaindex",
11+
"docker:dev": "pnpm docker:build && pnpm docker:run"
1212
},
1313
"nodemonConfig": {
1414
"execMap": {
@@ -34,9 +34,6 @@
3434
"@restackio/restack-sdk-cloud-ts": "^1.0.16",
3535
"@types/express": "^5.0.0",
3636
"@types/node": "^20.16.9",
37-
"@typescript-eslint/eslint-plugin": "^8.13.0",
38-
"@typescript-eslint/parser": "^8.13.0",
39-
"eslint": "^9.14.0",
4037
"ts-node": "^10.9.2",
4138
"typescript": "^5.6.3"
4239
}

0 commit comments

Comments
 (0)