Giter Club home page Giter Club logo

darwinyip / nysenate.gov-website-d9 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nysenate/nysenate.gov-website-d9

0.0 0.0 0.0 153.43 MB

Designed to increase public participation in the legislative process, this web application serves as the central digital presence of the New York State Senate.

License: GNU General Public License v2.0

Shell 0.33% JavaScript 5.16% PHP 39.46% CSS 1.73% SCSS 20.40% Twig 32.82% Gherkin 0.02% Mustache 0.08%

nysenate.gov-website-d9's Introduction

The New York State Senate - nysenate.gov

Package features

Asset packagist support

The Asset packagist package acts as a bridge between Composer and the popular NPM and Bower repositories, which catalog thousands of useful front-end and JavaScript packages. This allows developers to easily pull in packages like DropZoneJS and many others without requiring local Node.js to be installed.

Read more: https://lightning.acquia.com/blog/round-your-front-end-javascript-libraries-composer

Guardr core security

Guardr is a Drupal distribution with a combination of modules and settings to enhance a Drupal application's security and availability to meet enterprise security requirements. This project leverages Guardr's package management and module configuration.

Sub-profile support

A Drupal core patch has been included to add support for "Sub-profiles".

See: https://www.drupal.org/node/1356276

Rain base profile features

The Mediacurrent Rain base install profile includes many of the most common packages pre-configured for rapid site development and optional content features.

Setting up a DDEV-Local environment

Clone this repository into the directory of your choice:

Install composer on host machine

If you haven't already, install composer:

Set up Pantheon provider locally

If you haven't already, configure your local DDEV environment with a machine token from Pantheon. This will allow you to pull the database locally with a simple command.

See the DDEV Pantheon provider documentation for instructions.

Build & start the local environment

  • Switch to the repository path: $ cd nys_nysenate_gov
  • Switch to the “develop” branch: $ git checkout develop
  • Install composer dependencies: $ composer install
  • Connect ddev to Pantheon: $ ddev auth ssh
  • Duplicate the local settings file: cp web/sites/example.settings.local.php web/sites/default/settings.local.php
    • This makes the file available for making changes locally, should they be needed.
  • Start the environment: $ ddev start
  • Download a database backup from the production/live environment: $ ddev pull pantheon --skip-files
  • Confirm that the site is loaded properly: $ ddev drush st
    • If this does not indicate a working site, proceed to the troubleshooting section.

Confirm you can browse to https://nysenate.ddev.site.

Troubleshooting

  • Ensure ddev has started without errors. Correct errors before proceeding.

Initial Configuration

Logging In

  • Use ddev drush uli to login to your local installation.

Development Settings

  • The settings.local.php file contains settings for customizing the development environment. This disables Drupal's built in caching and additionally activates sites/development.services.yml for further customizing the development environment.

Development Workflow

  • Use Composer to add 3rd party dependencies and patches.
  • Write custom modules, themes etc. to the ./web/ directory.
  • Run ddev drush cex to export Drupal configuration to the profile/profilename/config/sync folder.
  • Make sure to run ddev composer install and then ddev drush deploy after pulling the latest from the develop branch. This will install the latest PHP dependencies and update/import the latest config into your database.

Additional Links

Re-index Search API

  • Due to the amount of content, there are some tips on how to get the site to re-index without timing out:
  • If you have changes to search API configuration run drush search-api-reset-tracker
  • Check admin/config/search/search-api/index/core_search to make sure that the tracking info has been reset if not, click the button that says "track info" - you may need to do this a couple times to run all the way through.
  • Run drush sapi-i to re-index and watch for any errors.
  • If the re-index times out you can pick it back up where it left off by running drush sapi-i again.

Github Actions

If a branch is created off of main with the naming convention feature/JIRA-1234, upon creating a pull request, a Github Action will run doing a composer build and a build of the front end assets. The assets will be pushed to Pantheon and a multi-dev environment will be created. As long as the pull request is open, you may continue to push changes to the feature branch and the multi-dev environment will be updated. Note, it can take up to 2.5 hours for a multi-dev environment to be created.

nysenate.gov-website-d9's People

Contributors

ptrcnvrr avatar aheaphy avatar brendonor avatar joestewart avatar catherineparkinson avatar richlawson avatar acebuen avatar routinet avatar geloreyesct avatar cnt-brian avatar kzalewski avatar webflo avatar jozl05 avatar mc-jenkins avatar nathanielwoodland avatar joelsteidl avatar mike-wilbur avatar saltwaterskin avatar johnzelmt avatar kimllantemorales avatar jaymediacurrent avatar denniscodetheory avatar weitzman avatar ramsesiden avatar cruno91 avatar janiicss avatar greg-1-anderson avatar pfrenssen avatar qjones3 avatar derhasi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.