Skip to content

Add webpack bundle for embedding lowcoder in plain html #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ WORKDIR /lowcoder-client/packages/lowcoder-sdk
RUN yarn install
RUN yarn build

WORKDIR /lowcoder-client/packages/lowcoder-sdk-webpack-bundle
RUN yarn install
RUN yarn build

##
## Intermediary Lowcoder client image
##
Expand All @@ -156,6 +160,8 @@ COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/low
COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder-comps/lowcoder-comps /lowcoder/client-comps
# Copy lowcoder SDK
COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder-sdk /lowcoder/client-sdk
# Copy lowcoder SDK webpack bundle
COPY --chown=lowcoder:lowcoder --from=build-client /lowcoder-client/packages/lowcoder-sdk-webpack-bundle/dist /lowcoder/client-embed


# Copy additional nginx init scripts
Expand Down
7 changes: 7 additions & 0 deletions deploy/docker/frontend/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
expires 1M;
}

location /embed {
try_files $uri =404;

alias /lowcoder/client-embed;
expires 1M;
}

location /assets {
try_files $uri =404;

Expand Down
Loading