diff --git a/.ddev/gitpod-setup-ddev.sh b/.ddev/gitpod-setup-ddev.sh new file mode 100644 index 00000000..170611f5 --- /dev/null +++ b/.ddev/gitpod-setup-ddev.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# Set up ddev for use on gitpod + +set -eu -o pipefail + +# Misc housekeeping before start +ddev config global --router-bind-all-interfaces +# Pass the GITPOD_WORKSPACE_URL env variable to the web container for our setup script +ddev config global --web-environment="DRUPAL_URL=$(gp url 8080),PHPMYADMIN_URL=$(gp url 8036),MAILHOG_URL=$(gp url 8025),DRUSH_OPTIONS_URI=https://127.0.0.1:8080" + +ddev get ddev/ddev-phpmyadmin + +ddev quick-start diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 00000000..5ceeb1bf --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,11 @@ +FROM gitpod/workspace-full +SHELL ["/bin/bash", "-c"] + +# Add DDEV’s GPG key to your keyring +RUN curl -fsSL https://pkg.ddev.com/apt/gpg.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/ddev.gpg > /dev/null + +# Add DDEV releases to your package repository +RUN echo "deb [signed-by=/etc/apt/trusted.gpg.d/ddev.gpg] https://pkg.ddev.com/apt/ * *" | sudo tee /etc/apt/sources.list.d/ddev.list >/dev/null + +# Update package information and install DDEV +RUN sudo apt update && sudo apt install -y ddev=1.23.3 diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000..88d535e8 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,58 @@ +# Docker image +image: + file: .gitpod.Dockerfile + +# ddev and composer are running as part of the prebuild +# when starting a workspace all docker images are ready +tasks: + - name: Startup + - command: | + bash .ddev/gitpod-setup-ddev.sh + gp ports await 8080 && gp preview $(gp url 8080) + +# VScode xdebug extension +vscode: + extensions: + - felixfbecker.php-debug + - bmewburn.vscode-intelephense-client + - ziyasal.vscode-open-in-github + +ports: + # Ddev db port + - port: 3306 + onOpen: ignore + # phpmyadmin https port + - port: 8027 + onOpen: ignore + # mailhog https port + - port: 8036 + onOpen: ignore + # Main web port + - port: 8080 + onOpen: ignore + visibility: public + # router https port that we're ignoring. + - port: 8443 + onOpen: ignore + # xdebug port + - port: 9000 + onOpen: ignore + +github: + prebuilds: + # enable for the master/default branch (defaults to true) + master: true + # enable for all branches in this repo (defaults to false) + branches: true + # enable for pull requests coming from this repo (defaults to true) + pullRequests: true + # enable for pull requests coming from forks (defaults to false) + pullRequestsFromForks: true + # add a check to pull requests (defaults to true) + addCheck: false + # add a "Review in Gitpod" button as a comment to pull requests (defaults to false) + addComment: false + # add a "Review in Gitpod" button to the pull request's description (defaults to false) + addBadge: true + # add a label once the prebuild is ready to pull requests (defaults to false) + addLabel: false