{"id":34638648,"url":"https://github.com/generoi/bedrock","last_synced_at":"2025-12-24T17:12:33.331Z","repository":{"id":154982115,"uuid":"91481718","full_name":"generoi/bedrock","owner":"generoi","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-17T12:16:00.000Z","size":9742,"stargazers_count":32,"open_issues_count":16,"forks_count":6,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-17T13:28:10.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gdsbedrock.kinsta.cloud/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/generoi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-16T16:44:21.000Z","updated_at":"2025-03-25T06:52:04.000Z","dependencies_parsed_at":"2024-08-16T12:32:31.652Z","dependency_job_id":"dde09cd8-9208-46db-9057-cec70fc94f6a","html_url":"https://github.com/generoi/bedrock","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/generoi/bedrock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fbedrock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fbedrock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fbedrock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fbedrock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generoi","download_url":"https://codeload.github.com/generoi/bedrock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generoi%2Fbedrock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28005414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T17:12:32.114Z","updated_at":"2025-12-24T17:12:33.325Z","avatar_url":"https://github.com/generoi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gdsbedrock\n\n_See [roots/bedrock](https://github.com/roots/bedrock#readme) readme for notes about the stack._\n\n## Requirements\n\n- PHP 8.0 - [Installation](https://formulae.brew.sh/formula/php@8.0)\n- Composer - [Installation](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)\n- DDEV - [Installation](https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/)\n- Prettier - [Installation](https://prettier.io/docs/en/editors.html)\n- EditorConfig - [Installation](https://editorconfig.org/#download)\n\n### Authenticate with fontawesome registry\n\nYou will need an authentication token, we have a shared one added to LastPass/1Password.\n\n    npm config set \"//npm.fontawesome.com/:_authToken\" \u003cAPI-KEY\u003e\n\n### Suggested extensions for Visual Studio Code\n\n- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)\n- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)\n- [PHP Intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client)\n- [PHP Debug](https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug)\n- [laravel-blade](https://marketplace.visualstudio.com/items?itemName=cjhowe7.laravel-blade)\n- [Laravel Pint](https://marketplace.visualstudio.com/items?itemName=open-southeners.laravel-pint)\n\n## Local project development with DDEV\n\n_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`_\n\n### Setup and run project\n\n    # Clone the repository and install the development dependencies.\n    git clone --recursive git@github.com:generoi/bedrock.git gdsbedrock\n    cd gdsbedrock\n\n    # Install composer dependencies and development tools (vendor folder)\n    composer install:development\n\n    # The repo uses `npm` workspaces so you you should run commands from root of\n    # project.\n    npm run install\n    npm run build:production\n\n    # Start the container\n    ddev start\n\n    # Fetch the remote database\n    ./vendor/bin/robo db:pull @production\n\n    # Login as admin\n    ddev wp login create \u003cuser\u003e\n    wp @production login create \u003cuser\u003e\n\nAdditional useful tasks\n\n    # Fetch the remote files (we also use a nginx fallback redirect for missing\n    # files)\n    ./vendor/bin/robo files:pull @production\n\n    # Importing database from a sql dump\n    ddev import-db \u003c dump.sql\n\n    # Create a database dump and import it\n    ./vendor/bin/robo db:export @ddev\n    ./vendor/bin/robo db:import @ddev\n\n    # Run tests which also prompts attempt to fix lint errors automatically.\n    ./vendor/bin/robo test\n\n    # To see all tasks available\n    ./vendor/bin/robo\n    ./vendor/bin/dep\n    ./vendor/bin/wp\n\n### NPM\n\n    # The root `package.json` delegates all scripts with a `--workspaces` flag\n    # so no flags is the same as\n    npm run build:production -ws\n    npm run build:production -w gds\n\n    # To install/remove a package you need to explicitly add the flag\n    npm install postcss-preset-env --save-dev -ws\n\n### Deploying with GitHub actions\n\nGo to [GitHub Actions deploy_production.yml](https://github.com/generoi/gdsbedrock/actions/workflows/deploy_production.yml) workflow and trigger a deploy.\n\nYou can also trigger the workflows from the command line.\n\n```sh\n./vendor/bin/robo deploy:production\n./vendor/bin/robo deploy:staging --branch=patch-1\n./vendor/bin/robo deploy:staging --log_level='-vvv'\n\n# You can still use `dep` directly like described in the section below\n./vendor/bin/dep cache:clear production\n```\n\n### Deploying from local\n\nSee [deployer-genero](https://github.com/generoi/deployer-genero) and run `./vendor/bin/dep` to see all available commands.\n\n```sh\n# Deploy to staging/production\n./vendor/bin/dep deploy staging\n./vendor/bin/dep deploy production\n\n# Clear all caches on production\n./vendor/bin/dep cache:clear production\n# Clear only WP Super Cache cache\n./vendor/bin/dep cache:clear:wpsc production\n\n# Open a shell on production server\n./vendor/bin/dep ssh production\n\n# Rollback a failed deploy\n./vendor/bin/dep rollback production\n```\n\n## Testing\n\n### PHPUnit unit tests\n\nTests require a database so they need to run either in `ddev`, using `wp serve`\nor with a local database available.\n\n```sh\nddev composer phpunit\n```\n\n### Playwright E2E Tests\n\n```sh\n# Install dependencies\nnpm run e2e:install\n\n# Run against ddev environment\nnpm run e2e:test\n\n# Run it against production\nURL=https://gdsbedrock.kinsta.cloudd npm run e2e:test\n```\n\n## Create a new project and Git repository\n\n_NOTE: If possible set the project name and repo name to use the domain name of the website. Example: `www.my-site.fi` =\u003e `my-site`. This will help with configuring all the different environments in the future._\n\n1. Create a new project in a new folder for your project\n\n   ```sh\n   # Prompt, create and enter directory\n   echo 'Project directory:'; read project; composer create-project --keep-vcs --repository-url=\"https://packagist.minasithil.genero.fi\" generoi/bedrock:dev-master $project; cd $project;\n\n   # Just create\n   composer create-project --keep-vcs --repository-url=\"https://packagist.minasithil.genero.fi\" generoi/bedrock:dev-master \u003cproject-dir\u003e\n\n   # If you cloned the repo rather than used `create-project` you'll need to:\n   # 1. You need to first install robo.\n   composer install:development\n   # 2. replace the placeholder names with a project machine name.\n   ./vendor/bin/robo search:replace\n   ```\n\n2. Setup the DDEV container\n\n   ```sh\n   ddev start\n   ```\n\n3. Setup the staging/production environment\n\n   ```sh\n   # Configure the environment\n   vim wp-cli.yml\n   vim robo.yml\n\n   # Prep the remote environment\n   ./vendor/bin/dep setup staging\n\n   # Make a first deployment (this will fail due to there not being any database)\n   ./vendor/bin/dep setup staging\n\n   # Deploy your code, files and database\n   ./vendor/bin/robo db:push @staging\n   ./vendor/bin/robo files:push @staging\n\n   # Deploy once more with database available\n   ./vendor/bin/dep deploy staging\n   ```\n\n4. Setup the GitHub actions, E2E tests etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Fbedrock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneroi%2Fbedrock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneroi%2Fbedrock/lists"}