|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
| 3 | +# Download ddev's images |
| 4 | +ddev debug download-images |
| 5 | + |
3 | 6 | # Set up ddev for use on gitpod |
4 | 7 | DRUPAL_DIR="${GITPOD_REPO_ROOT}/drupal" |
5 | | -DDEV_DIR="${DRUPAL_DIR}/.ddev" |
6 | | - |
7 | | -# Generate a config.gitpod.yaml that adds the gitpod |
8 | | -# proxied ports so they're known to ddev. |
9 | | -shortgpurl="${GITPOD_WORKSPACE_URL#'https://'}" |
10 | | - |
11 | | -cat <<CONFIGEND > "${DDEV_DIR}"/config.gitpod.yaml |
12 | | -#ddev-gitpod-generated |
13 | | -php_version: "7.4" |
14 | | -bind_all_interfaces: true |
15 | | -host_webserver_port: 8080 |
16 | | -# Will ignore the direct-bind https port, which will land on 2222 |
17 | | -host_https_port: 2222 |
18 | | -# Allows local db clients to run |
19 | | -host_db_port: 3306 |
20 | | -# Assign MailHog port |
21 | | -host_mailhog_port: 8025 |
22 | | -# Assign phpMyAdmin port |
23 | | -host_phpmyadmin_port: 8036 |
24 | | -CONFIGEND |
25 | | - |
26 | | -# We need host.docker.internal inside the container, |
27 | | -# So add it via docker-compose.host-docker-internal.yaml |
28 | | -hostip=$(awk "\$2 == \"$HOSTNAME\" { print \$1; }" /etc/hosts) |
29 | | - |
30 | | -cat <<COMPOSEEND >"${DDEV_DIR}"/docker-compose.host-docker-internal.yaml |
31 | | -#ddev-gitpod-generated |
32 | | -version: "3.6" |
33 | | -services: |
34 | | - web: |
35 | | - environment: |
36 | | - - DRUSH_OPTIONS_URI=$(gp url 8080) |
37 | | - extra_hosts: |
38 | | - - "host.docker.internal:${hostip}" |
39 | | -COMPOSEEND |
40 | 8 |
|
41 | 9 | # Misc housekeeping before start |
42 | | -ddev config global --instrumentation-opt-in=true --omit-containers=ddev-router |
| 10 | +ddev config global --instrumentation-opt-in=true |
43 | 11 |
|
44 | 12 | # Start ddev |
45 | | -cd $DRUPAL_DIR && ddev start |
| 13 | +cd $DRUPAL_DIR && ddev start -y |
0 commit comments