Skip to content
Snippets Groups Projects
Commit 499e11ee authored by Fran Garcia-Linares's avatar Fran Garcia-Linares
Browse files

DB snapshot and updated settings per environment.

parent 160bab1d
No related branches found
No related tags found
No related merge requests found
Pipeline #84270 passed
Showing
with 79 additions and 69 deletions
......@@ -43,7 +43,6 @@ module:
entity_browser_entity_form: 0
entity_embed: 0
entity_reference_revisions: 0
environment_indicator: 0
field: 0
field_group: 0
field_hidden: 0
......
uuid: a37cf9b5-5f41-4229-8d37-7e954c567d40
langcode: en
langcode: es
status: true
dependencies:
config:
......
_core:
default_config_hash: IDaAmxPqBchgGMN2sx1z3Ek2tBWSOT1oZkOjS0MDmPU
langcode: es
toolbar_integration:
- toolbar
favicon: true
git: true
uuid: 5e0ee61b-5053-46af-b3fb-9f2a44aa3efc
langcode: es
status: true
dependencies: { }
_core:
default_config_hash: 3L0HnLq9LiCzdd8zSollV9_ttcQkiYQqnemT4Nh9Nzc
machine: acquia_dev
description: null
name: 'Acquia Dev'
weight: null
url: 'http://paragonbhybefranz.devcloud.acquia-sites.com/'
fg_color: '#ffffff'
bg_color: '#000000'
uuid: eacc15c3-358f-49f5-9d03-71a1847c232b
langcode: es
status: true
dependencies: { }
_core:
default_config_hash: f1lI5cVLRl-OggnkaMNaxUAWJoSIouXHgrZ2D-33E4k
machine: local
description: null
name: Local
weight: null
url: 'http://paragon.lndo.site/'
fg_color: '#fefdff'
bg_color: '#005093'
......@@ -13,14 +13,15 @@ logo:
third_party_settings:
shortcut:
module_link: true
preset_accent_color: blue
preset_accent_color: custom
preset_focus_color: gin
enable_darkmode: '0'
classic_toolbar: classic
classic_toolbar: new
secondary_toolbar_frontend: false
high_contrast_mode: false
accent_color: ''
accent_color: '#114502'
focus_color: ''
layout_density: ''
show_description_toggle: false
show_user_theme_settings: false
icon_default: true
......
original.sql*
## Development database
Use this database to develop new features on the site.
The database is sanitized.
#!/bin/bash
## This script will replace the snapshot used to set up
## a local copy with your current (sanitized) database.
## Run the script from the project root folder, like this:
## $ database/generate-snapshot.sh
# Copy the current one, to bring it back later.
ddev export-db --file=./database/original.sql.gz
# Sanitize the DB and export it.
ddev drush -y sql:sanitize
ddev export-db --file=./database/snapshot.sql.gz
# Restore the previous database.
ddev import-db --file=./database/original.sql.gz
rm ./database/original.sql.gz
echo "*********************************************************************************"
echo "* Remember to run 'ddev drush cex' so the 'config' folder matches the database. *"
echo "*********************************************************************************"
File added
......@@ -77,7 +77,6 @@ dependencies:
- site_settings
- embed
- entity_browser_entity_form
- environment_indicator
- linkit
- focal_point
- imageapi_optimize
......
......@@ -27,7 +27,13 @@ $settings['config_exclude_modules'] = [
'upgrade_rector',
];
// @todo Put the production URL here so all environments can get the files from it.
// $config['stage_file_proxy.settings']['origin'] = 'https://api.stage.cluster.drupalsystems.org';
$config['stage_file_proxy.settings']['origin'] = 'https://www.drupal.es';
$config['google_analytics.settings']['account'] = 'UA-XXXXXXX-XX';
$config['gin.settings']['preset_accent_color'] = 'custom';
// #58b058 - (Default) Green for local.
$config['gin.settings']['accent_color'] = '#58b058';
// $settings['config_readonly'] = FALSE;
<?php
// #5868b0 - Blue for dev.
$config['gin.settings']['accent_color'] = '#5868b0';
// Do not allow config changes on dev via UI.
if (PHP_SAPI !== 'cli') {
$settings['config_readonly'] = TRUE;
}
......@@ -18,3 +18,9 @@ $config['stage_file_proxy.settings']['origin'] = FALSE;
// @todo change the below with prod settings.
$config['google_analytics.settings']['account'] = 'UA-XXXXXXX-XX';
// #c73030 - Red red for prod.
$config['gin.settings']['accent_color'] = '#c73030';
// Do not allow config changes on prod via UI.
$settings['config_readonly'] = TRUE;
<?php
// #c5c730 - Yellow for stage.
$config['gin.settings']['accent_color'] = '#c5c730';
// Do not allow config changes on stage via UI.
$settings['config_readonly'] = TRUE;
# Set up
Some of the installation steps were taken from here: [#3404467](https://www.drupal.org/project/la_eu/issues/3404467).
You will need [ddev](https://ddev.com/get-started/) to work on the project.
# Base steps
You need to bring all the code first, and then the database. We will use
`stage_file_proxy` for the files.
## Bring the code
First time:
```
git clone git@git.drupal.org:project/la_es.git drupales
cd drupales
```
# The ddev configuration was created like this:
# ddev config --project-name=drupales --project-type=drupal10 --docroot=docroot --php-version=8.2
Then:
```
git pull
ddev start
ddev composer install
```
## Installing from existing database
## Bring the database
Useful to debug issues that are happening in the live system.
```
ddev import-db --file=database/dump.sql.gz
ddev drush sql:sanitize
ddev drush deploy
```
## Installing from existing config
Useful to debug common issues or adding new features.
```
ddev drush si --existing-config
```
## How was the first installation done
## Installing from scratch (DO NOT DO THIS)
The following was done during the first set up and is no longer needed.
First time set-up only.
Some of the installation steps were taken from here:
[#3404467](https://www.drupal.org/project/la_eu/issues/3404467).
### Via terminal
Via drush, like this:
It was done via drush, like this:
```
ddev drush si -y --account-name=admin --account-pass=admin
ddev drush en -y la_eu_default_content
ddev drush pmu -y default_content
```
### Via UI
You can install with the UI, just make sure that you choose English as language.
```
ddev launch
```
Then follow the steps until the end and:
- Enable `la_eu_default_content`
- Uninstall `default_content`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment