Skip to content
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

feat: container image #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rgarrigue
Copy link

@rgarrigue rgarrigue commented Sep 19, 2023

Solve #26

To try out localy

docker build -t local/mermaid-to-excalidraw  .
docker run -d -p 8080:80 --name mte local/mermaid-to-excalidraw:latest
# Head to http://localhost:8080
docker rm -f mte

I c/c the source code of the playground, tried to adapt and it doesn't work. So the index.html needs fixing, though I don't know how

@vercel
Copy link

vercel bot commented Sep 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
mermaid-to-excalidraw ✅ Ready (Inspect) Visit Preview Sep 19, 2023 8:27am

Comment on lines +11 to +15
RUN yarn build

FROM nginx:1.21-alpine

COPY --from=build /opt/node_app/dist /opt/node_app/index.html /usr/share/nginx/html/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this will be a playground image, we need to change the command to yarn build:playground, and copying of the files needs to be done from the /public folder (bundle will correctly make chunks for current library). This should solve the image problem.

Suggested change
RUN yarn build
FROM nginx:1.21-alpine
COPY --from=build /opt/node_app/dist /opt/node_app/index.html /usr/share/nginx/html/
RUN yarn build:playground
FROM nginx:1.21-alpine
COPY --from=build /opt/node_app/public /usr/share/nginx/html/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rgarrigue can you try applying the suggested changes by @igorwessel above and it should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants