stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.93k stars 171 forks source link

Deploying webcontainer apps on Google Cloud #1587

Open manalac-luis opened 2 weeks ago

manalac-luis commented 2 weeks ago

Describe the bug

I ran the stackblitz-webcontainer tutorial-demo locally and it worked: I then tried to run it on a Google Cloud Compute Instance w/ SSL on port 443, and it could definitely connect. But the WebContainer itself could not be accessed. Specifically, I get a security Error Is there some secret sauce to get webcontainers to work on the cloud. I've tried dozens of security settings. Also, I noted that vite.config.js is set to the recommended settings. import { defineConfig } from 'vite';

export default defineConfig({ server: { headers: { 'Cross-Origin-Embedder-Policy': 'require-corp', 'Cross-Origin-Opener-Policy': 'same-origin', }, },

I'm assuming stackblizt webcontainer apps can be deployed via Cloud -- or am I mistaken ?

Link to the blitz that caused the error

https://stackblitz.com/~/github.com/luis-gigabox/stackblitz-webcontainer-api-starter-vok4uv

Steps to reproduce

Install the tutorial demo on GCP and run it.

Expected behavior

Expected that webcontainer apps can be deployed on GCP.

Parity with Local

Screenshots

image

Platform

Additional context

No response