Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Add gitpod setup. #166

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .ddev/gitpod-setup-ddev.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
58 changes: 58 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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