Giter Club home page Giter Club logo

ministryofjustice.prisoner-content-hub-backend's Introduction

Digital Hub Backend

The backend CMS for the Digital Hub service using Drupal

Getting started

Prerequisites

Composer
Docker

Install dependencies

composer clear-cache && \
composer install --no-dev --no-ansi --no-scripts --prefer-dist --ignore-platform-reqs --no-interaction --no-autoloader

Running the application

Being a PHP/Drupal application, there is a requirement for Apache to be set up and configured. The simplest way of setting up the application for development is using Docker-Compose and the provided overrides to mount a volume on the host machine

Custom Modules

The application is built using Docker, using a Drupal base image.

All custom code specific to the Digital Hub project is implemented as Drupal modules, these are located in

./docroot/modules/custom

Configuration

Drupal configuration is stored inside the config/sync directory. This is imported during the deployment process, to simulate this on your local environment run the following:

vendor/bin/drush deploy

Please note that any configuration that has been modified on the environment you are importing to, will be wiped.

To make any configuration changes, make the change on your local environment, and run drush config-export, then push the changes to git.

Restoring a database dump

Prerequisites

Docker

Apply dump to hub_db in Docker

docker exec -i hub-db mysql -u <DB_USER> --password=<DB_PASS> hubdb < ~/path/to/dump.sql

Apply dump to hub_db in Kubernetes

kubectl exec -it <POD_ID> -c mysql -- mysql -u <DB_USER> --password=<DB_PASS> < cat ~/path/to/dump.sql

Character encoding

You can manually specify the encoding type when importing

--default-character-set=<ENC_TYPE>

ministryofjustice.prisoner-content-hub-backend's People

Contributors

davidthomas22 avatar glenjamin avatar jhackettpps avatar lazzurs avatar leonk avatar lucascairns avatar psoleckimoj avatar romidane avatar simoncross747 avatar spikeheap 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.