Skip to content

Commit

Permalink
Merge pull request #110 from systemseed/enhancements
Browse files Browse the repository at this point in the history
[#168024777] Enhancements
  • Loading branch information
PavelBulat committed Aug 26, 2019
2 parents d774c59 + 1b16137 commit 034e880
Show file tree
Hide file tree
Showing 42 changed files with 409 additions and 93 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- run:
name: Add Falcon domain host into /etc/hosts
command: echo 127.0.0.1 falcon.docker.localhost app.docker.localhost | sudo tee -a /etc/hosts
command: echo 127.0.0.1 admin.docker.localhost frontend.docker.localhost | sudo tee -a /etc/hosts

- run:
name: Install test dependencies
Expand Down
24 changes: 12 additions & 12 deletions .env.default
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# docker4drupal variables.
PROJECT_NAME=falcon
PROJECT_NAME=Falcon

FRONTEND_HOST=app.docker.localhost
BACKEND_HOST=falcon.docker.localhost
FRONTEND_URL=http://app.docker.localhost
BACKEND_URL=http://falcon.docker.localhost
FRONTEND_HOST=frontend.docker.localhost
BACKEND_HOST=admin.docker.localhost
FRONTEND_URL=http://frontend.docker.localhost
BACKEND_URL=http://admin.docker.localhost

PROJECT_BASE_URL=docker.localhost

Expand All @@ -15,26 +15,26 @@ DB_ROOT_PASSWORD=password
DB_HOST=mariadb
DB_DRIVER=mysql

MARIADB_TAG=10.1-3.2.2
MARIADB_TAG=10.1-3.6.2
# MacOS.
PHP_TAG=7.3-dev-macos-4.13.0
PHP_TAG=7.3-dev-macos-4.13.6
# Linux.
# PHP_TAG=7.3-dev-4.13.0
NGINX_TAG=1.13-5.0.0
NODE_TAG=10.16-0.18.0
# PHP_TAG=7.3-dev-4.13.6
NGINX_TAG=1.17-5.6.6
NODE_TAG=12.8-0.21.1

# Docker-compose environment variables - see https://docs.docker.com/compose/reference/envvars/
COMPOSE_FILE=./.docker/docker-compose.yml:./.docker/docker-compose.override.yml
COMPOSE_PROJECT_NAME=falcon

ENVIRONMENT=development
DEVELOPMENT_MODULES=devel falcon_development reroute_email config_update_ui features_ui config_distro config_merge config_provider config_snapshot config_sync
ADDITIONAL_MODULES=rest_entity_recursive falcon_feature_thankq falcon_thankq falcon_navigation falcon_gift_ecards falcon_feature_commerce_example_gateway falcon_feature_example falcon_feature_gifts falcon_feature_gifts_bundle falcon_feature_gift_cards falcon_feature_gifts_bundle_cards falcon_feature_mail falcon_feature_webform
ADDITIONAL_MODULES=rest_entity_recursive falcon_feature_thankq falcon_thankq falcon_navigation falcon_gift_ecards falcon_feature_commerce_example_gateway falcon_feature_example falcon_feature_gifts falcon_feature_gifts_bundle falcon_feature_gift_cards falcon_feature_gifts_bundle_cards falcon_feature_webform
TEST_USERS_PASSWORD=secure_password
DOCKER_PHPCS=willhallonline/drupal-phpcs:alpine
DOCKER_ESLINT=savoirfairelinux/eslint-airbnb:latest

NODE_DEBUG=falcon:*
NODE_DEBUG=falcon*

# Local environment variables.
# On Linux machines you can put DB into memory - /dev/shm
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ install: | prepare up
$(MAKE) -s drush en $(DEVELOPMENT_MODULES); \
fi

# Generate XML sitemap.
$(MAKE) -s drush simple-sitemap-generate

$(call message,Congratulations! You installed $(PROJECT_NAME)!)

code\:check:
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ the sources:
* `.docker/docker-compose.override.yml` comes from `.docker/docker-compose.override.default.yml`.

### Access the site
Backend: `http://falcon.docker.localhost` (credentials: admin / admin)
Demo frontend (work in progress): `http://app.docker.localhost`

Backend: `http://admin.docker.localhost` (credentials: `admin` / `admin`)
Demo frontend (work in progress): `http://frontend.docker.localhost`

### Production-ready installations

Expand Down
3 changes: 2 additions & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ the sources:

Access the site
~~~~~~~~~~~~~~~
Go to http://falcon.docker.localhost
Go to http://frontend.docker.localhost to see the frontend and http://admin.docker.localhost to access the backend.

1 change: 1 addition & 0 deletions falcon/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"drupal/rest_entity_recursive": "^1.0@beta",
"drupal/restui": "^1.15",
"drupal/scheduler": "^1.0",
"drupal/simple_sitemap": "^3.3",
"drupal/smtp": "^1.0@beta",
"drupal/svg_image": "^1.8",
"drupal/token": "^1.3",
Expand Down
63 changes: 62 additions & 1 deletion falcon/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion falcon/falcon.info.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Falcon
type: profile
description: 'Falcon distribution for API-First Drupal using JSON API.'
description: 'Decoupled Drupal distribution for Charities.'
core: 8.x

# Optional: Declare your installation profile as a distribution
Expand Down Expand Up @@ -76,6 +76,7 @@ dependencies:
- restui
- rest_absolute_urls
- require_login
- simple_sitemap
- smtp
- token
- ultimate_cron
Expand Down
22 changes: 17 additions & 5 deletions falcon/falcon.install
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,32 @@ function falcon_install() {
'falcon_feature_mail',
'falcon_feature_metatag',
'falcon_feature_text_format',
'falcon_feature_user'
'falcon_feature_user',
'falcon_feature_xml_sitemap',
];

$module_installer = \Drupal::service('module_installer');

// Enable default custom features.
$module_installer->install($FEATURES_DEFAULT_ENABLED);

// We need to add image styles that were added in falcon_feature_demo to consumer.
// Create a new default consumer.
$consumer = \Drupal::entityTypeManager()->getStorage('consumer')->create([
'uuid' => '114e3e1a-6f65-49a8-9a24-v0043fabd6e7',
'type' => 'consumer',
'label' => 'Falcon',
'is_default' => TRUE,
'image_styles' => [['target_id' => 'full_size']]
]);
$consumer->save();

// Delete the old consumer created by Consumers module upon installation.
/* @var $consumers \Drupal\Core\Entity\ContentEntityInterface[] */
$consumers = \Drupal::entityTypeManager()
->getStorage('consumer')
->loadByProperties(['label' => 'Falcon Frontend Application']);
$consumer = array_pop($consumers);
$consumer->set('image_styles', [['target_id' => 'full_size']])->save();
->loadByProperties(['label' => 'Default Consumer']);
$default_consumer = array_shift($consumers);
$default_consumer->delete();

// Add demo content.
$module_installer->install(['falcon_demo_content']);
Expand Down
19 changes: 0 additions & 19 deletions falcon/modules/custom/falcon_common/falcon_common.install

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"label": [
{
"value": "Falcon Default Settings"
"value": "Falcon Settings"
}
],
"type": [
Expand All @@ -39,15 +39,15 @@
],
"changed": [
{
"value": "2019-07-28T14:35:49+00:00",
"value": "2019-08-22T11:21:29+00:00",
"lang": "und",
"format": "Y-m-d\\TH:i:sP"
}
],
"metatag": [
{
"value": {
"title": "Default Consumer"
"title": "Falcon"
}
}
],
Expand All @@ -56,7 +56,7 @@
"tag": "meta",
"attributes": {
"name": "title",
"content": "Default Consumer"
"content": "Falcon"
},
"lang": "und"
}
Expand Down Expand Up @@ -97,9 +97,14 @@
"target_id": "falcon-default"
}
],
"field_robots_txt": [
{
"value": "User-agent: *
\nCrawl-delay: 10
\n
\n# Checkout URLs.
\nDisallow: \/*\/checkout?
\nDisallow: \/*\/checkout\/
\nDisallow: \/*\/checkout$
\n
\n# Internal paths.
\nDisallow: \/_
\n"
}
],
"field_site_name": [
{
"value": "Falcon Default"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
index: true
priority: '1.0'
changefreq: ''
include_images: false
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies:
- path
- pathauto
- scheduler
- simple_sitemap
- text
- user
version: 8.x-1.0
Expand Down

0 comments on commit 034e880

Please sign in to comment.