Skip to content

Deploying webcontainer apps on Google Cloud #1587

Open
@manalac-luis

Description

@manalac-luis

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

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions