Colab User commited on
Commit
edb5cd6
·
1 Parent(s): 61e5331

Initial commit: Deploy rasa-engine API server

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -7,24 +7,26 @@ WORKDIR /app
7
  # Install pnpm
8
  RUN npm install -g pnpm
9
 
10
- # Copy root package.json and pnpm-workspace.yaml FIRST
11
  COPY package.json pnpm-workspace.yaml ./
12
 
13
- # Copy lib/ and artifacts/ directories for all workspace packages.
14
- # This includes the package.json for @workspace/api-zod.
15
  COPY lib lib/
16
- COPY artifacts artifacts/
17
 
18
  # First, install dependencies required to run the codegen for api-spec.
19
  # This will install 'orval' which is a devDependency of @workspace/api-spec.
20
  RUN pnpm install --filter=@workspace/api-spec --no-frozen-lockfile
21
 
22
  # Now, run the codegen to generate @workspace/api-zod.
23
- # This populates artifacts/api-zod/src/generated.
24
  RUN pnpm --filter=@workspace/api-spec run codegen
25
 
26
- # After codegen, perform a full pnpm install for all workspace packages.
27
- # Now that @workspace/api-zod's source files are generated, pnpm can properly link it.
 
 
 
 
28
  RUN pnpm install --no-frozen-lockfile
29
 
30
  # Build the api-server project.
 
7
  # Install pnpm
8
  RUN npm install -g pnpm
9
 
10
+ # Copy root package.json and pnpm-workspace.yaml
11
  COPY package.json pnpm-workspace.yaml ./
12
 
13
+ # Copy lib/ to make @workspace/api-spec and its dependencies available
 
14
  COPY lib lib/
 
15
 
16
  # First, install dependencies required to run the codegen for api-spec.
17
  # This will install 'orval' which is a devDependency of @workspace/api-spec.
18
  RUN pnpm install --filter=@workspace/api-spec --no-frozen-lockfile
19
 
20
  # Now, run the codegen to generate @workspace/api-zod.
21
+ # This populates artifacts/api-zod/src/generated. This needs to happen BEFORE other packages try to link to api-zod.
22
  RUN pnpm --filter=@workspace/api-spec run codegen
23
 
24
+ # After codegen, copy the 'artifacts' directory. Now, 'artifacts/api-zod' will contain the generated code,
25
+ # and 'artifacts/api-server' (with its package.json) will be present for the full install.
26
+ COPY artifacts artifacts/
27
+
28
+ # Perform a full pnpm install for all workspace packages.
29
+ # Now that @workspace/api-zod's source files are generated, pnpm can properly link it to @workspace/api-server.
30
  RUN pnpm install --no-frozen-lockfile
31
 
32
  # Build the api-server project.