Skip to content

Commit 429e411

Browse files
authored
Merge branch 'alpha' into fix-fields
2 parents 06de2d6 + 62b3426 commit 429e411

File tree

4 files changed

+30
-24
lines changed

4 files changed

+30
-24
lines changed

Dockerfile

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
############################################################
22
# Build stage
33
############################################################
4-
FROM node:lts-alpine as build
4+
FROM node:lts-alpine AS build
55

6-
RUN apk update; \
7-
apk add git;
6+
RUN apk --no-cache add git
87
WORKDIR /tmp
98

109
# Copy package.json first to benefit from layer caching
@@ -13,37 +12,32 @@ COPY package*.json ./
1312
# Copy src to have config files for install
1413
COPY . .
1514

16-
# Clean npm cache; added to fix an issue with the install process
17-
RUN npm cache clean --force
18-
19-
# Install all dependencies
20-
RUN npm ci
21-
22-
# Run build steps
23-
RUN npm run build
15+
# Install without scripts
16+
RUN npm ci --omit=dev --ignore-scripts \
17+
# Copy production node_modules aside for later
18+
&& cp -R node_modules prod_node_modules \
19+
# Install all dependencies
20+
&& npm ci \
21+
# Run build steps
22+
&& npm run build
2423

2524
############################################################
2625
# Release stage
2726
############################################################
28-
FROM node:lts-alpine as release
29-
30-
RUN apk update; \
31-
apk add git;
27+
FROM node:lts-alpine AS release
3228

3329
VOLUME /parse-server/cloud /parse-server/config
3430

3531
WORKDIR /parse-server
3632

37-
COPY package*.json ./
38-
39-
# Clean npm cache; added to fix an issue with the install process
40-
RUN npm cache clean --force
41-
RUN npm ci --production --ignore-scripts
33+
# Copy build stage folders
34+
COPY --from=build /tmp/prod_node_modules /parse-server/node_modules
35+
COPY --from=build /tmp/lib lib
4236

37+
COPY package*.json ./
4338
COPY bin bin
4439
COPY public_html public_html
4540
COPY views views
46-
COPY --from=build /tmp/lib lib
4741
RUN mkdir -p logs && chown -R node: logs
4842

4943
ENV PORT=1337

changelogs/CHANGELOG_alpha.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# [6.0.0-alpha.24](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.23...6.0.0-alpha.24) (2023-01-09)
2+
3+
4+
### Features
5+
6+
* Reduce Docker image size by improving stages ([#8359](https://github.com/parse-community/parse-server/issues/8359)) ([40810b4](https://github.com/parse-community/parse-server/commit/40810b48ebde8b1f21d2448a3a4de0585b1b5e34))
7+
8+
9+
### BREAKING CHANGES
10+
11+
* The Docker image does not contain the git dependency anymore; if you have been using git as a transitive dependency it now needs to be explicitly installed in your Docker file, for example with `RUN apk --no-cache add git` (#8359) ([40810b4](40810b4))
12+
113
# [6.0.0-alpha.23](https://github.com/parse-community/parse-server/compare/6.0.0-alpha.22...6.0.0-alpha.23) (2023-01-08)
214

315

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "6.0.0-alpha.23",
3+
"version": "6.0.0-alpha.24",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {

0 commit comments

Comments
 (0)