forked from amplication/amplication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (36 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# node:12
FROM node@sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090 AS build
COPY package.json .
COPY package-lock.json .
RUN npm ci
COPY lerna.json lerna.json
COPY packages/amplication-server/package.json packages/amplication-server/package.json
COPY packages/amplication-server/package-lock.json packages/amplication-server/package-lock.json
COPY packages/amplication-server/prisma/schema.prisma packages/amplication-server/prisma/schema.prisma
COPY packages/amplication-client/package.json packages/amplication-client/package.json
COPY packages/amplication-client/package-lock.json packages/amplication-client/package-lock.json
COPY packages/amplication-data-service-generator/package.json packages/amplication-data-service-generator/package.json
COPY packages/amplication-data-service-generator/package-lock.json packages/amplication-data-service-generator/package-lock.json
COPY packages/amplication-data/package.json packages/amplication-data/package.json
COPY packages/amplication-data/package-lock.json packages/amplication-data/package-lock.json
RUN npm run bootstrap
COPY codegen.yml codegen.yml
COPY packages packages
RUN npm run build
RUN npm run clean -- --yes
# node:12
FROM node@sha256:d0738468dfc7cedb7d260369e0546fd7ee8731cfd67136f6023d070ad9679090
EXPOSE 3000
COPY --from=build package.json .
COPY --from=build package-lock.json .
RUN npm ci --production
COPY --from=build lerna.json lerna.json
COPY --from=build packages packages
RUN npm run bootstrap -- -- --production
RUN npm run prisma:generate
# Copy entrypoint script
COPY docker-entrypoint.sh /entrypoint.sh
# Give entrypoint script access permission
RUN chmod 755 /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "node", "packages/amplication-server/dist/src/main"]