@crawlee/templates 3.0.3-beta.4 → 3.0.3-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/templates",
3
- "version": "3.0.3-beta.4",
3
+ "version": "3.0.3-beta.7",
4
4
  "description": "Templates for the crawlee projects",
5
5
  "engines": {
6
6
  "node": ">=16.0.0"
@@ -1,19 +1,25 @@
1
- # using multistage build, as we need dev deps to build the TS source code
1
+ # First, specify the base Docker image. You can read more about
2
+ # the available images at https://crawlee.dev/docs/guides/docker-images
3
+ # You can also use any other image from Docker Hub.
2
4
  FROM apify/actor-node:16 AS builder
3
5
 
4
- # copy all files, install all dependencies (including dev deps) and build the project
5
- COPY . ./
6
- RUN npm install --include=dev \
7
- && npm run build
6
+ # Second, copy the TS source files, package.json and package-lock.json since it should be
7
+ # the only files that affects the installation and build in the next step
8
+ COPY package*.json ./
9
+ COPY src ./src
8
10
 
9
- # create final image
11
+ # Install all dependencies (including dev deps) and build the project
12
+ RUN npm install --include=dev && npm run build
13
+
14
+ # Create final image
10
15
  FROM apify/actor-node:16
11
- # copy only necessary files
16
+
17
+ # Copy only necessary files
12
18
  COPY --from=builder /usr/src/app/package.json ./
13
19
  COPY --from=builder /usr/src/app/README.md ./
14
20
  COPY --from=builder /usr/src/app/dist ./dist
15
21
 
16
- # install only prod deps
22
+ # Install only prod deps
17
23
  RUN npm --quiet set progress=false \
18
24
  && npm install --only=prod --no-optional \
19
25
  && echo "Installed NPM packages:" \
@@ -23,5 +29,5 @@ RUN npm --quiet set progress=false \
23
29
  && echo "NPM version:" \
24
30
  && npm --version
25
31
 
26
- # run compiled code
32
+ # Run compiled code
27
33
  CMD npm run start:prod
@@ -1,19 +1,25 @@
1
- # using multistage build, as we need dev deps to build the TS source code
1
+ # First, specify the base Docker image. You can read more about
2
+ # the available images at https://crawlee.dev/docs/guides/docker-images
3
+ # You can also use any other image from Docker Hub.
2
4
  FROM apify/actor-node:16 AS builder
3
5
 
4
- # copy all files, install all dependencies (including dev deps) and build the project
5
- COPY . ./
6
- RUN npm install --include=dev \
7
- && npm run build
6
+ # Second, copy the TS source files, package.json and package-lock.json since it should be
7
+ # the only files that affects the installation and build in the next step
8
+ COPY package*.json ./
9
+ COPY src ./src
8
10
 
9
- # create final image
11
+ # Install all dependencies (including dev deps) and build the project
12
+ RUN npm install --include=dev && npm run build
13
+
14
+ # Create final image
10
15
  FROM apify/actor-node-playwright-chrome:16
11
- # copy only necessary files
16
+
17
+ # Copy only necessary files
12
18
  COPY --from=builder /usr/src/app/package.json ./
13
19
  COPY --from=builder /usr/src/app/README.md ./
14
20
  COPY --from=builder /usr/src/app/dist ./dist
15
21
 
16
- # install only prod deps
22
+ # Install only prod deps
17
23
  RUN npm --quiet set progress=false \
18
24
  && npm install --only=prod --no-optional \
19
25
  && echo "Installed NPM packages:" \
@@ -23,5 +29,5 @@ RUN npm --quiet set progress=false \
23
29
  && echo "NPM version:" \
24
30
  && npm --version
25
31
 
26
- # run compiled code
27
- CMD npm run start:prod
32
+ # Run compiled code
33
+ CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod
@@ -1,19 +1,25 @@
1
- # using multistage build, as we need dev deps to build the TS source code
1
+ # First, specify the base Docker image. You can read more about
2
+ # the available images at https://crawlee.dev/docs/guides/docker-images
3
+ # You can also use any other image from Docker Hub.
2
4
  FROM apify/actor-node:16 AS builder
3
5
 
4
- # copy all files, install all dependencies (including dev deps) and build the project
5
- COPY . ./
6
- RUN npm install --include=dev \
7
- && npm run build
6
+ # Second, copy the TS source files, package.json and package-lock.json since it should be
7
+ # the only files that affects the installation and build in the next step
8
+ COPY package*.json ./
9
+ COPY src ./src
8
10
 
9
- # create final image
11
+ # Install all dependencies (including dev deps) and build the project
12
+ RUN npm install --include=dev && npm run build
13
+
14
+ # Create final image
10
15
  FROM apify/actor-node-puppeteer-chrome:16
11
- # copy only necessary files
16
+
17
+ # Copy only necessary files
12
18
  COPY --from=builder /usr/src/app/package.json ./
13
19
  COPY --from=builder /usr/src/app/README.md ./
14
20
  COPY --from=builder /usr/src/app/dist ./dist
15
21
 
16
- # install only prod deps
22
+ # Install only prod deps
17
23
  RUN npm --quiet set progress=false \
18
24
  && npm install --only=prod --no-optional \
19
25
  && echo "Installed NPM packages:" \
@@ -23,5 +29,5 @@ RUN npm --quiet set progress=false \
23
29
  && echo "NPM version:" \
24
30
  && npm --version
25
31
 
26
- # run compiled code
27
- CMD npm run start:prod
32
+ # Run compiled code
33
+ CMD ./start_xvfb_and_run_cmd.sh && npm run start:prod