rgoodie / drupal-codespace

Run Drupal 9 inside a Codespace for development purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drupal 9 Codespaces example

Run Drupal 9 inside a Codespace for development purposes.

The .devcontainer folder contains configuration to spin up a Codespace running Apache, MySQL, PHP 8.1 and Composer, based on Microsoft's PHP devcontainer.

How to use it

  1. Start a Codespace, and from the terminal run composer install to download Drupal 9 and it's PHP dependencies.

  2. Click the PORTS tab, and hover over the local address line for port 80. Click the globe icon, which will open your Drupal website in a new browser tab

    Browse a drupal site in codespaces

  3. Follow the prompts to install your brand-new Drupal site

  4. Database credentials can be found in .devcontainer/devcontainer.env. If you haven't changed this, the database server hostname is db. Database name, username and password are all drupal.

    Drupal setup

Customization

Replace composer.json with your own site's version -- one that includes whatever modules or dependencies are needed for your site.

Prior art

This example is based on the work of @alchatti.

About

Run Drupal 9 inside a Codespace for development purposes

License:MIT License


Languages

Language:PHP 97.9%Language:Shell 2.1%