Skip to content

Commit

Permalink
chore(#439): update nuxt and gitpod
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 9, 2022
1 parent 50cb52b commit dfb2c67
Show file tree
Hide file tree
Showing 99 changed files with 94 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ API_PROXY=1
#OAUTH_CLIENT_ID=
#GITHUB_CLIENT_ID=
#GITHUB_CLIENT_SECRET=
OAUTH_CALLBACK=https://3000-druxt-demodruxtjsorg-8mj77eqh701.ws-us59.gitpod.io/callback
OAUTH_CLIENT_ID=88e88ac3-e514-41a4-8175-580c8aa9b0f3
55 changes: 53 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@ image:
file: .gitpod/Dockerfile

tasks:
- init: npm ci
command: npm run dev
- init: |
# Setup Gitpod .env
# $GITPOD_REPO_ROOT/.gitpod/scripts/env-setup.sh
# Setup DDev
$GITPOD_REPO_ROOT/.gitpod/scripts/ddev-download-images.sh
# $GITPOD_REPO_ROOT/.gitpod/scripts/ddev-setup.sh
# Install Drupal
# $GITPOD_REPO_ROOT/.gitpod/scripts/drupal-setup.sh
# Installing Nuxt
$GITPOD_REPO_ROOT/.gitpod/scripts/nuxt-setup.sh
command: |
# Setup Gitpod .env
$GITPOD_REPO_ROOT/.gitpod/scripts/env-setup.sh
# Start DDev
# $GITPOD_REPO_ROOT/.gitpod/scripts/ddev-setup.sh
# Add OAuth2 consumer
# cd $GITPOD_REPO_ROOT/drupal && ddev druxt-add-consumer
# Setup Nuxt
$GITPOD_REPO_ROOT/.gitpod/scripts/nuxt-setup.sh
# Start Nuxt
cd $GITPOD_REPO_ROOT/nuxt && NUXT_TELEMETRY_DISABLED=1 npm run dev
vscode:
extensions:
Expand All @@ -13,11 +32,43 @@ vscode:
- octref.vetur

ports:
# Drupal
- port: 8080
onOpen: ignore
visibility: public

# Nuxt/Druxt
- port: 3000
onOpen: ignore
visibility: public

# Nuxt/Druxt
- port: 3003
onOpen: ignore
visibility: public

# Currently un-notified and unsupported mailhog http port
- port: 8025
onOpen: ignore
# Currently un-notified and unsupported mailhog https port
- port: 8026
onOpen: ignore
# Currently un-notified and unsupported phpmyadmin http port
- port: 8036
onOpen: ignore
# Currently un-notified and unsupported phpmyadmin https port
- port: 8037
onOpen: ignore
# router http port that we're ignoring.
- port: 8888
onOpen: ignore
# router https port that we're ignoring.
- port: 8889
onOpen: ignore
# xdebug port
- port: 9003
onOpen: ignore

github:
prebuilds:
master: true
Expand Down
7 changes: 7 additions & 0 deletions .gitpod/scripts/ddev-download-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

ddev version | awk '/(drud|phpmyadmin)/ {print $2;}' >/tmp/images.txt
while IFS= read -r item
do
docker pull "$item"
done < <(cat /tmp/images.txt)
9 changes: 9 additions & 0 deletions .gitpod/scripts/ddev-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

DRUPAL_DIR="${GITPOD_REPO_ROOT}/drupal"

# Misc housekeeping before start
ddev config global --instrumentation-opt-in=true

# Start ddev
cd $DRUPAL_DIR && ddev start
7 changes: 7 additions & 0 deletions .gitpod/scripts/drupal-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -eu -o pipefail

DRUPAL_DIR="${GITPOD_REPO_ROOT}/drupal"

# Set up Drupal website
cd "$DRUPAL_DIR" && ddev drupal-install
4 changes: 4 additions & 0 deletions .gitpod/scripts/env-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -eu -o pipefail

echo -en "OAUTH_CALLBACK=https://3000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}/callback\nOAUTH_CLIENT_ID=${GITPOD_INSTANCE_ID}" >> .env
11 changes: 11 additions & 0 deletions .gitpod/scripts/nuxt-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

# Set up Druxt for use on gitpod

set -eu -o pipefail

DRUXT_DIR="${GITPOD_REPO_ROOT}/nuxt"

# Set up Nuxt
cd "$DRUXT_DIR" && echo "BASE_URL=$(gp url 8080)" > .env
cd "$DRUXT_DIR" && npm i
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DruxtJS demo - Umami food magazine
# Druxt Umami - A decoupled food magazine

> Drupal Umami installation profile + DruxtSite
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dfb2c67

Please sign in to comment.