-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
67 lines (62 loc) · 3.51 KB
/
Dockerfile.dev
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
57
58
59
60
61
62
63
64
65
66
67
FROM node:20-alpine3.18 as build
# Installing libvips-dev for sharp Compatibility
RUN apk update && apk add --no-cache git libc6-compat build-base bash gcc autoconf automake zlib-dev libpng-dev vips-dev > /dev/null 2>&1
ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
ARG STRAPI_PUBLIC_URL
ENV STRAPI_PUBLIC_URL=${STRAPI_PUBLIC_URL}
WORKDIR /opt/app
COPY ./package.json ./yarn.lock ./
ENV PATH /opt/app/node_modules/.bin:$PATH
COPY ./apps/pdc-dashboard/package.json apps/pdc-dashboard/package.json
COPY ./apps/pdc-frontend/package.json apps/pdc-frontend/package.json
COPY ./apps/pdc-sc/package.json apps/pdc-sc/package.json
COPY ./apps/vth-dashboard/package.json apps/vth-dashboard/package.json
COPY ./apps/vth-frontend/package.json apps/vth-frontend/package.json
COPY ./apps/kennisbank-dashboard/package.json apps/kennisbank-dashboard/package.json
COPY ./apps/overige-objecten-api/package.json apps/overige-objecten-api/package.json
COPY ./apps/kennisbank-frontend/package.json apps/kennisbank-frontend/package.json
COPY ./packages/catalogi-data/package.json packages/catalogi-data/package.json
COPY ./packages/preview-button/package.json packages/preview-button/package.json
COPY ./packages/samenwerkende-catalogi/package.json packages/samenwerkende-catalogi/package.json
COPY ./packages/strapi-plugin-gemeente-select/package.json packages/strapi-plugin-gemeente-select/package.json
COPY ./packages/strapi-plugin-scheme-select/package.json packages/strapi-plugin-scheme-select/package.json
COPY ./packages/strapi-tiptap-editor/package.json packages/strapi-tiptap-editor/package.json
COPY ./packages/ui/package.json packages/ui/package.json
COPY ./packages/upl/package.json packages/upl/package.json
COPY ./packages/strapi-plugin-uniform-product-name/package.json packages/strapi-plugin-uniform-product-name/package.json
COPY ./packages/strapi-plugin-open-forms-embed/package.json packages/strapi-plugin-open-forms-embed/package.json
COPY ./packages/strapi-plugin-uuid-field/package.json packages/strapi-plugin-uuid-field/package.json
COPY ./packages/strapi-plugin-env-label/package.json packages/strapi-plugin-env-label/package.json
COPY ./packages/strapi-plugin-language/package.json packages/strapi-plugin-language/package.json
# Build target dependencies #
#############################
FROM build AS dependencies
# Install prod dependencies
COPY ./patches /opt/app/patches
RUN yarn install
# Build target builder #
########################
FROM build AS builder
COPY --from=dependencies /opt/app/node_modules /opt/app/node_modules
COPY . /opt/app/
RUN npm run build --workspace @frameless/upl && \
npm run build --workspace @frameless/strapi-plugin-uniform-product-name && \
npm run build --workspace @frameless/strapi-tiptap-editor && \
npm run build --workspace @frameless/ui && \
npm run build --workspace @frameless/catalogi-data && \
npm run build --workspace @frameless/samenwerkende-catalogi && \
npm run build --workspace @frameless/pdc-sc && \
npm run build --workspace @frameless/strapi-plugin-open-forms-embed && \
npm run build --workspace @frameless/strapi-plugin-uuid-field && \
npm run build --workspace @frameless/strapi-plugin-env-label && \
npm run build --workspace @frameless/strapi-plugin-language && \
npm run build --workspace @frameless/overige-objecten-api
# Build target production #
###########################
FROM build AS development
COPY --from=builder /opt/app /opt/app
COPY --from=dependencies /opt/app/node_modules /opt/app/node_modules
RUN chmod +x ./bin/wait-for-it.sh
EXPOSE 1337
CMD ["yarn", "dev"]