Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed local.settings.php to settings.local.php #7

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
19d2587
Merge branch 'master' of github.com:AcroMedia/commerce-demo
smmccabe Sep 20, 2017
7b3a84e
Create .platform.app.yaml
GuGuss Sep 26, 2017
81845f7
Create services.yaml
GuGuss Sep 26, 2017
9b96c09
Create routes.yaml
GuGuss Sep 26, 2017
fe3cc96
Add Solr configuration
GuGuss Sep 26, 2017
8015808
Automatically compile SASS files during the build.
GuGuss Sep 26, 2017
bb4360e
Merge pull request #3 from GuGuss/patch-1
smmccabe Sep 27, 2017
8018d4f
added database and files dump as a quick hack for easy setup
smmccabe Sep 28, 2017
d8a4a79
Merge branch 'master' of github.com:AcroMedia/commerce-demo
smmccabe Sep 28, 2017
fec9a9e
Composer module updates.
Oct 2, 2017
7da705b
Downgrade doctrine/collections to ver 1.4 . 1.5 requires php7.1 which…
Oct 2, 2017
6c0698e
Downgrade other doctrine packages because they require php 7.1.
Oct 2, 2017
dd19d91
Fix bad tour element selector for Catalog and SOLR tours.
Oct 2, 2017
6a99c19
Fix brand category facet 'show more'. Wasn't working correctly since …
Oct 3, 2017
16053e6
Update .gitlab-ci.yml - Update stages and add deployment for enhanced…
Oct 11, 2017
8233923
Update Drupal core to 8.4. Update gitlab-ci.
Oct 12, 2017
3b836b9
Rollback Drupal core to 8.3.x
Oct 12, 2017
9e13e08
Removes SOLR specific wording from tours to make them more generic.
Oct 17, 2017
b8a92ea
Update core and modules.
Oct 23, 2017
462f40a
Add twig debug parameters back into develoment.services.yml.
Oct 23, 2017
917dc02
Update build and deploy stages of .gitlab-ci.yml and set to use rsync…
Oct 23, 2017
65a2284
Update .gitlab-ci.yml deploy final stage to use php 7.1.
Oct 23, 2017
4a8f4db
Adds drush and project dependency. Update .gitlab-ci.yml deploy to us…
Oct 23, 2017
bd093e1
Update .gitlab-ci.yml deploy final stage to use php 7.1 & project drush.
Oct 23, 2017
6a32717
More gitlab-ci.yml updates - getting drush to run w/ php 7.1.
Oct 23, 2017
c5fc2f2
More gitlab-ci.yml updates - getting drush to run w/ php 7.1.
Oct 23, 2017
cad0bdc
Try requiring drush 9.0 to see if it fixes failing deploy.
Oct 23, 2017
59132a9
Change .gitlab-ci.yml to have build dev and build live.
Oct 23, 2017
be50847
Try working around 7.1 vs 7.0 problem with interactive shell + .bash_…
Oct 23, 2017
fdced66
Fix typo
Oct 23, 2017
2e33b2d
Add some debug info from the remote side's environment
Oct 23, 2017
4e0891d
Break up commands into individual steps
Oct 23, 2017
8465481
Bundle remote drush commands into a script so we have more control ov…
Oct 23, 2017
c160ac6
Fix typo
Oct 23, 2017
2be1548
Update remote-drush-commands.sh script to check for PHP and Drush ver…
Oct 24, 2017
4cc48ac
Update remote-drush-commands.sh script - change order of drush commands.
Oct 24, 2017
b8cece3
Update gitlab-ci.yml to use remote-drush-commands scripts for all oth…
Oct 24, 2017
eefb4a3
Temporarily add UAT branch to gitlab-ci.yml live deploys.
Oct 24, 2017
6ca3f93
Create bin dir if it doesnt exist
Oct 24, 2017
78c3503
Create bin dir if it doesnt exist - Now for the remaining scripts.
Oct 24, 2017
1a905c4
Update database for Drupal 8.4.
Oct 25, 2017
b87b50d
Update README
Oct 25, 2017
d58b976
Update gitlab-ci.yml by removing UAT branch from live deploys.
Oct 25, 2017
7b1aee9
Add GitLab code and bug report links into footer.
Oct 25, 2017
52cea41
Changed local.settings.php to settings.local.php
Oct 30, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 125 additions & 15 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ variables:
stages:
- test
- build
- deploy
- deploy-uat
- deploy-live

code_standards:
stage: test
Expand Down Expand Up @@ -58,9 +59,37 @@ custom_tests_d8:
#- ../vendor/phpunit/phpunit/phpunit -c core/phpunit.xml.dist --group SITENAME
- echo 'No custom unit tests currently, edit config if they are added'

build:
build-dev:
stage: build

only:
- UAT

# this tells the build server to save these files between jobs, this keeps them to be deployed
artifacts:
paths:
- bin
- vendor
- web
- web/themes/custom/commerce_2_demo/css

script:
# Run Composer to build site (use --no-dev for production builds).
- composer install --no-interaction
# Compile Sass from theme.
- cd web/themes/custom/commerce_2_demo
- npm install
- gulp sass
# Remove the node_modules dir generated from npm install.
- rm -rf node_modules

build-live:
stage: build

# NOTE: Master is also pushed to public accessible GitHub repo: https://github.com/AcroMedia/commerce-demo
only:
- master

# this tells the build server to save these files between jobs, this keeps them to be deployed
artifacts:
paths:
Expand All @@ -70,20 +99,23 @@ build:
- web/themes/custom/commerce_2_demo/css

script:
# Run Composer to build site (use --no-dev for production builds).
- composer install --no-interaction --no-dev
# Compile Sass from theme.
- cd web/themes/custom/commerce_2_demo
- npm install
- gulp sass
# Remove the node_modules dir generated from npm install.
- rm -rf node_modules

# Deploy STAGING site (AWS1).
deploy-uat:
stage: deploy
# Deploy base demo to STAGING site (AWS1).
base-demo-to-uat:
stage: deploy-uat
when: manual

# add any other tags or branches you want here
only:
- master
- guided_tours
- UAT

environment:
name: uat
Expand All @@ -107,23 +139,63 @@ deploy-uat:
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

#move updated files up to deployment server, exclude .git since it's not needed
- rsync -av --no-perms --no-owner --no-group --exclude '.git' /builds/acro/commerce-2-demo/ [email protected]:/home/commerce-2-demo/www/commerce-2-demo/
- rsync -av --no-perms --no-owner --no-group --exclude-from '.gitlabci-rsync-exclude.txt' --exclude '.git' --delete ./ [email protected]:/home/commerce-2-demo/www/commerce-2-demo/

# log into the site and flush cache
- ssh [email protected] 'cd www/commerce-2-demo && composer install'
# IMPORTANT: Drupal 8.4 and Drush need PHP 7.1 but server defaults to 7.0. Need script to check PHP version and use the right one.
- ssh [email protected] '/bin/bash -u -e -s' < ./scripts/remote-drush-commands_base-uat.sh

# Deploy CLIENT demo (CLOUD4 - manual deploy only).
deploy-cloud4:
stage: deploy
# Deploy plus demo to STAGING site (AWS1).
plus-demo-to-uat:
stage: deploy-uat
when: manual

# add any other tags or branches you want here
only:
- UAT

environment:
name: uat
url: https://commerceplus.aws1.acrobuild.com

script:
# Install ssh-agent if not already installed, it is required by Docker
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'

# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)

# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$DEPLOY_KEY_UAT")

# For Docker builds disable host key checking. Be aware that by adding that
# you are susceptible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

#move updated files up to deployment server, exclude .git since it's not needed
- rsync -av --no-perms --no-owner --no-group --exclude-from '.gitlabci-rsync-exclude.txt' --exclude '.git' --delete ./ [email protected]:/home/commerce-2-demo/www/commerceplus/

# log into the site and flush cache
# IMPORTANT: Drupal 8.4 and Drush need PHP 7.1 but server defaults to 7.0. Need script to check PHP version and use the right one.
- ssh [email protected] '/bin/bash -u -e -s' < ./scripts/remote-drush-commands_plus-uat.sh


# Deploy base demo to LIVE site (CLOUD4).
base-demo-to-live:
stage: deploy-live
when: manual

# add any other tags or branches you want here
# NOTE: Master is also pushed to public accessible GitHub repo: https://github.com/AcroMedia/commerce-demo
only:
- master

environment:
name: cloud4
url: https://demo.drupalcommerce.com
url: https://commercedemo.acromedia.com

script:
# Install ssh-agent if not already installed, it is required by Docker
Expand All @@ -143,8 +215,46 @@ deploy-cloud4:
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

# Install composer and move updated files up to deployment server, exclude .git since it's not needed
- rsync -av --no-perms --no-owner --no-group --exclude '.git' /builds/acro/commerce-2-demo/ [email protected]:/home/drupalcommerce/www/demo/
- rsync -av --no-perms --no-owner --no-group --exclude-from '.gitlabci-rsync-exclude.txt' --exclude '.git' --delete ./ [email protected]:/home/drupalcommerce/www/demo/

# log into the site and flush cache
- ssh [email protected] 'cd www/demo/web && drush cr'
# IMPORTANT: Drupal 8.4 and Drush need PHP 7.1 but server defaults to 7.0. Need script to check PHP version and use the right one.
- ssh [email protected] '/bin/bash -u -e -s' < ./scripts/remote-drush-commands_base-live.sh

# Deploy plus demo to LIVE site (CLOUD4).
plus-demo-to-live:
stage: deploy-live
when: manual

# add any other tags or branches you want here.
# NOTE: Master is also pushed to public accessible GitHub repo: https://github.com/AcroMedia/commerce-demo
only:
- master

environment:
name: cloud4
url: https://demoplus.cloud4.acromedia.com

script:
# Install ssh-agent if not already installed, it is required by Docker
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'

# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)

# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$DEPLOY_KEY_CLIENT_DEMO")

# For Docker builds disable host key checking. Be aware that by adding that
# you are susceptible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config.
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'

# Install composer and move updated files up to deployment server, exclude .git since it's not needed
- rsync -av --no-perms --no-owner --no-group --exclude-from '.gitlabci-rsync-exclude.txt' --exclude '.git' --delete ./ [email protected]:/home/drupalcommerce/www/demoplus/

# log into the site and flush cache
# IMPORTANT: Drupal 8.4 and Drush need PHP 7.1 but server defaults to 7.0. Need script to check PHP version and use the right one.
- ssh [email protected] '/bin/bash -u -e -s' < ./scripts/remote-drush-commands_plus-live.sh
6 changes: 6 additions & 0 deletions .gitlabci-rsync-exclude.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dumps
data
db_backups
database.sql
web/sites/default/files
web/sites/default/settings.local.php
112 changes: 112 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# This file describes an application. You can have multiple applications
# in the same project.
#
# See https://docs.platform.sh/user_guide/reference/platform-app-yaml.html

# The name of this app. Must be unique within a project.
name: 'app'

# The runtime the application uses.
type: 'php:7.1'

# Configuration of the build of this application.
build:
flavor: composer

# The relationships of the application with services or other applications.
#
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
database: 'mysqldb:mysql'
solr: 'solrsearch:main'
# redis: 'rediscache:redis'

dependencies:
nodejs:
npm: '~5.4.2'

# The configuration of app when it is exposed to the web.
web:
# Specific parameters for different URL prefixes.
locations:
'/':
# The folder from which to serve static assets, for this location.
#
# This is a filesystem path, relative to the application root.
root: 'web'

# How long to allow static assets from this location to be cached.
#
# Can be a time in seconds, or -1 for no caching. Times can be
# suffixed with "s" (seconds), "m" (minutes), "h" (hours), "d"
# (days), "w" (weeks), "M" (months, as 30 days) or "y" (years, as
# 365 days).
expires: 5m

# Whether to forward disallowed and missing resources from this
# location to the application.
#
# Can be true, false or a URI path string.
passthru: '/index.php'

# Deny access to static files in this location.
allow: false

# Rules for specific URI patterns.
rules:
# Allow access to common static files.
'\.(jpe?g|png|gif|svgz?|css|js|map|ico|bmp|eot|woff2?|otf|ttf)$':
allow: true
'^/robots\.txt$':
allow: true
'^/sitemap\.xml$':
allow: true

'/sites/default/files':
# Allow access to all files in the public files directory.
allow: true
expires: 5m
passthru: '/index.php'
root: 'web/sites/default/files'

# Do not execute PHP scripts.
scripts: false

rules:
# Provide a longer TTL (2 weeks) for aggregated CSS and JS files.
'^/sites/default/files/(css|js)':
expires: 2w

# The size of the persistent disk of the application (in MB).
disk: 2048

# The 'mounts' describe writable, persistent filesystem mounts in the application. The keys are
# directory paths, relative to the application root. The values are strings such as
# 'shared:files/NAME', where NAME is just a unique name for the mount.
mounts:
'/web/sites/default/files': 'shared:files/files'
'/tmp': 'shared:files/tmp'
'/private': 'shared:files/private'
'/drush-backups': 'shared:files/drush-backups'

# The hooks executed at various points in the lifecycle of the application.
hooks:
build: |
cd web/themes/custom/commerce_2_demo
npm install
npm run build-sass
# The deploy hook runs after your application has been deployed and started.
deploy: |
cd web
drush -y cache-rebuild
drush -y updatedb
drush -y config-import
drush -y entup

# The configuration of scheduled execution.
crons:
drupal:
spec: '*/20 * * * *'
cmd: 'cd web ; drush core-cron'
12 changes: 12 additions & 0 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The routes of the project.
#
# Each route describes how an incoming URL is going
# to be processed by Platform.sh.

"https://{default}/":
type: upstream
upstream: "app:http"

"https://www.{default}/":
type: redirect
to: "https://{default}/"
22 changes: 22 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# The services of the project.
#
# Each service listed will be deployed
# to power your Platform.sh project.

mysqldb:
type: "mysql:10.2"
disk: 2048
#
#rediscache:
# type: "redis:3.2"
#
solrsearch:
type: "solr:6.6"
disk: 1024
configuration:
cores:
drupalcommerce_demo:
conf_dir: !archive "solr-conf/6.x"
endpoints:
main:
core: drupalcommerce_demo
31 changes: 31 additions & 0 deletions .platform/solr-conf/6.x/elevate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!--
This file allows you to boost certain search items to the top of search
results. You can find out an item's ID by searching directly on the Solr
server. The item IDs are in general constructed as follows:
Search API:
$document->id = $index_id . '-' . $item_id;
Apache Solr Search Integration:
$document->id = $site_hash . '/' . $entity_type . '/' . $entity->id;

If you want this file to be automatically re-loaded when a Solr commit takes
place (e.g., if you have an automatic script active which updates elevate.xml
according to newly-indexed data), place it into Solr's data/ directory.
Otherwise, place it with the other configuration files into the conf/
directory.

See http://wiki.apache.org/solr/QueryElevationComponent for more information.
-->

<elevate>
<!-- Example for ranking the node #1 first in searches for "example query": -->
<!--
<query text="example query">
<doc id="default_node_index-1" />
<doc id="7v3jsc/node/1" />
</query>
-->
<!-- Multiple <query> elements can be specified, contained in one <elevate>. -->
<!-- <query text="...">...</query> -->
</elevate>
14 changes: 14 additions & 0 deletions .platform/solr-conf/6.x/mapping-ISOLatin1Accent.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file contains character mappings for the default fulltext field type.
# The source characters (on the left) will be replaced by the respective target
# characters before any other processing takes place.
# Lines starting with a pound character # are ignored.
#
# For sensible defaults, use the mapping-ISOLatin1Accent.txt file distributed
# with the example application of your Solr version.
#
# Examples:
# "À" => "A"
# "\u00c4" => "A"
# "\u00c4" => "\u0041"
# "æ" => "ae"
# "\n" => " "
Loading