WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.3k stars 4.11k forks source link

wp-env: Codespaces compatibility #35794

Open Luehrsen opened 2 years ago

Luehrsen commented 2 years ago

With the advent of GitHub Codespaces I guess there will be some desire to use a prepackaged solution like wp-env to generate a more or less standardised development solution. I am aware of the irony to spawn a docker container that spawns a docker container. But in my eyes are the advantages that come with wp-env greater than the drawbacks that you have to span a lightweight container to initialise wp-env.

The purpose of this issue is to find and define the things that could/should be changed to make integration with codespaces possible and better.

The creation of a Dockerfile or the devcontainer.json is NOT within the scope of this issue.


WordPress URL https://github.com/WordPress/gutenberg/blob/f7b26abf34542fc0a801a2b48564e38c9685bda6/packages/env/lib/wordpress.js#L45

Codespaces forwards ports to custom URLs. Meaning a port 8888 is not accessible via https://codespaces-url.com:8888, but via a special URL like https://codespaces-url-8888.com. This warrants, that the complete install URL has to be customisable, ideally with an environment variable.

jordesign commented 1 year ago

Checking this issue - I'm wondering if this is something that the WordPress Playground solves? https://developer.wordpress.org/playground/ @Luehrsen

Luehrsen commented 1 year ago

No. At least not yet. Playground is not configurable as wp-env is and deviates in a lot of important steps, that are non-trivial for dev-work. (SQL db, etc.)