Skip to content

Commit e1ecf1c

Browse files
committed
Atualiza Dockerfile
1 parent 9893b88 commit e1ecf1c

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

frontend/Dockerfile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# syntax=docker/dockerfile:1
22
ARG VOLTO_VERSION
3-
FROM plone/frontend-builder:${VOLTO_VERSION} as builder
3+
FROM plone/frontend-builder:${VOLTO_VERSION} AS builder
44

5-
COPY --chown=node packages/volto-pythonbrasil-site /app/packages/volto-pythonbrasil-site
5+
COPY --chown=node packages/volto-project-title /app/packages/volto-project-title
66
COPY --chown=node volto.config.js /app/
77
COPY --chown=node package.json /app/package.json.temp
8+
COPY --chown=node mrs.developer.json /app/
9+
COPY --chown=node pnpm-workspace.yaml /app/
810

911
RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT
10-
python3 -c "import json; data = json.load(open('package.json.temp')); deps = data['dependencies']; data['dependencies'].update(deps); json.dump(data, open('package.json', 'w'), indent=2)"
11-
rm package.json.temp
12-
pnpm install && pnpm build:deps
13-
pnpm build
14-
pnpm install --prod
12+
set -e
13+
python3 -c "import json; orig_data = json.load(open('package.json.temp')); orig_deps = orig_data['dependencies']; data = json.load(open('package.json')); data['dependencies'].update(orig_deps); json.dump(data, open('package.json', 'w'), indent=2)"
14+
rm package.json.temp
15+
pnpm dlx mrs-developer missdev --no-config --fetch-https
16+
pnpm install && pnpm build:deps
17+
pnpm build
18+
pnpm install --prod
1519
EOT
1620

1721
FROM plone/frontend-prod-config:${VOLTO_VERSION}
@@ -22,3 +26,10 @@ LABEL maintainer="PloneGov-BR <[email protected]>" \
2226
org.label-schema.vendor="PloneGov-BR"
2327

2428
COPY --from=builder /app/ /app/
29+
30+
RUN <<EOT
31+
set -e
32+
corepack enable pnpm
33+
corepack use [email protected]
34+
corepack prepare [email protected] --activate
35+
EOT

0 commit comments

Comments
 (0)