Skip to content

Commit 157b1b6

Browse files
committed
Merge branch 'main' of github.com:devgateway/data-viz-wordpress
# Conflicts: # plugins/wp-react-blocks-plugin/blocks/webpack.config.js
2 parents 7d0789f + 302039c commit 157b1b6

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ wp-content/uploads
44
node_modules/
55
.git
66
dist
7-
build/
87
packages/create-wp-customizer/
98
packages/upgrade-wp-customizer/
109
# Log files

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,25 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
1919

2020
FROM base AS builder
2121

22+
ENV NODE_ENV=production
23+
2224
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
2325
--mount=type=bind,source=package.json,target=package.json \
2426
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
2527
--mount=type=bind,source=packages/commons/package.json,target=packages/commons/package.json \
2628
pnpm install --frozen-lockfile
2729

30+
# Build the plugins
31+
RUN BLOCKS_CATEGORY=wp-react-lib-blocks BLOCKS_NS=viz \
32+
pnpm --filter="@devgateway/dvz-wp-commons" --filter="dg-react-blocks" build
33+
2834
# Organize WordPress files to the container
2935
COPY wp-content wp-content
30-
COPY plugins wp-content/plugins
3136
COPY wp-theme wp-content/themes/dg-semantic
3237

33-
# Build the plugins
34-
RUN pnpm --filter="@devgateway/dvz-wp-commons" --filter="dg-react-blocks" build
38+
# Copy built plugins from workspace into wp-content so built assets are included
39+
RUN mkdir -p wp-content/plugins \
40+
&& cp -a plugins/. wp-content/plugins/
3541

3642
# Create a tarball of the wp-content directory
3743
RUN chown -R 82:82 wp-content \
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
node_modules/
2-
build/
2+
.env
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BLOCKS_CATEGORY=wp-react-lib-blocks
2+
BLOCKS_NS=viz
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d

plugins/wp-react-blocks-plugin/blocks/webpack.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module.exports = {
1515
},
1616
plugins: [
1717
...defaultConfig.plugins,
18-
new Dotenv({path: '.env'}),
18+
new Dotenv({
19+
systemvars: true,
20+
safe: true
21+
}),
1922
]
2023
};

0 commit comments

Comments
 (0)