-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/universal:2", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-in-docker:1": {}, | ||
"ghcr.io/ddev/ddev/install-ddev:latest": {} | ||
}, | ||
"portsAttributes": { | ||
"3306": { | ||
"label": "database" | ||
}, | ||
"8027": { | ||
"label": "mailhog" | ||
}, | ||
"8036": { | ||
"label": "phpmyadmin" | ||
}, | ||
"8080": { | ||
"label": "web http" | ||
}, | ||
"8443": { | ||
"label": "web https" | ||
} | ||
}, | ||
"extensions": [ | ||
"EditorConfig.EditorConfig", | ||
"xdebug.php-debug", | ||
"bmewburn.vscode-intelephense-client", | ||
"cjhowe7.laravel-blade", | ||
"github.vscode-github-actions" | ||
], | ||
"postCreateCommand": "bash .devcontainer/setup_project.sh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -eu -o pipefail | ||
set -x | ||
|
||
export DDEV_NONINTERACTIVE=true | ||
|
||
ddev config global --omit-containers=ddev-router | ||
ddev debug download-images | ||
|
||
ddev stop -a | ||
ddev start -y | ||
|
||
npm config set "//npm.fontawesome.com/:_authToken" $NPM_FONTAWESOME_AUTH_TOKEN | ||
composer config --global http-basic.satispress.generodigital.com $SATISPRESS_API_KEY $SATISPRESS_PASSWORD | ||
composer config --global github-oauth.github.com $PACKAGIST_GITHUB_TOKEN | ||
|
||
cp .env.example .env | ||
sed -i "s/WP_HOME=.*/WP_HOME='https:\/\/$CODESPACE_NAME-8080.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN'/" .env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,6 @@ You will need an authentication token, we have a shared one added to LastPass/1P | |
|
||
_If you are on Windows you should read the latest DDEV documentation and recommendations for getting things running. You'll need to run all composer, npm, robo and dep commands from within the DDEV container. Remember to send your SSH keys to container using `ddev auth ssh`_ | ||
|
||
### Setup and run project | ||
|
||
# Clone the repository and install the development dependencies. | ||
git clone --recursive [email protected]:generoi/bedrock.git gdsbedrock | ||
cd gdsbedrock | ||
|
@@ -82,6 +80,21 @@ Additional useful tasks | |
./vendor/bin/dep | ||
./vendor/bin/wp | ||
|
||
## Remote project development with GitHub codespaces | ||
|
||
# Create a codespace and install development tools when the setup tasks are done | ||
composer install:development | ||
cd web/app/themes/gds && npm run build | ||
|
||
# SSH into codespace forwarding your keys so that you can pull the database from production. | ||
gh codespace ssh -- -o ForwardAgent=yes | ||
|
||
# Pull the database | ||
./vendor/bin/robo db:pull @production | ||
./vendor/bin/robo db:search-replace @ddev 'gdsbedrock.ddev.site' "$CODESPACE_NAME-8080.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN" | ||
|
||
## Deploy | ||
|
||
### Deploying with GitHub actions | ||
|
||
Go to [GitHub Actions deploy_production.yml](https://github.com/generoi/gdsbedrock/actions/workflows/deploy_production.yml) workflow and trigger a deploy. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters