sp rak3000/drupal-composed

此包已被废弃,不再维护。未建议替代包。

带有Linguo安装配置文件的Drupal 7可组合版本

1.1.0 2014-08-25 01:54 UTC

This package is auto-updated.

Last update: 2020-02-11 17:49:03 UTC


README

此存储库已被存档并作为参考资料保留。它不再维护。

我在工作中已经开发了几年的Drupal 7站点、模块和主题。我还一直在工作中使用Composer来管理非Drupal项目的依赖项。Drupal已经成为正在工作的网站的一个依赖项。虽然Drupal 8与Composer等现代工具绑定,但令人遗憾的是,我们中的大多数人仍然需要使用D7,直到D8正式发布并成熟。

这就是“Drupal Composed”的由来,我的努力是为了创建一个Composer项目,只需一个简单的命令即可安装Drupal 7。此包将安装我的Linguo安装配置文件,启用法语和德语翻译,并使用Bootstrap主题为网站。我的Linguo安装配置文件包括我在构建健壮的多语言网站过程中发现的所有有用模块。

要求

此项目需要在您的服务器上全局安装Composerdrush。您还需要安装drush语言命令

使用

安装Linguo Drupal

要安装Linguo Drupal配置文件,请运行以下命令,并用相应的值替换/path/to/your/sitedbusernamedbpassworddbserverdbname

$ DRUPAL_ROOT='/path/to/your/site/public/' DB_URL_DRUPAL='mysql://dbusername:dbpassword@dbserver/dbname' composer install

完成后,您可以将虚拟主机指向/path/to/your/site/public。安装输出的一部分将包含一行您的Drupal管理凭据:安装完成。用户名:admin 用户密码:randomstringhere

更新Linguo Drupal

为了跟上Linguo的变化,您可以使用以下命令替换/path/to/your/site的相应值

$ DRUPAL_ROOT='/path/to/your/site/public/' composer update

示例Apache虚拟主机配置

<VirtualHost *:80>
  ServerName www.example.com

  DocumentRoot  /sites/drupal-composed/public/

  FileETag none

  RewriteEngine On

  CustomLog ${APACHE_LOG_DIR}/www.example.com_access_log f5-combined

  # Also send access and error logs to syslog with descriptive tag
  CustomLog "|/usr/bin/logger -t apache2-access-www.example.com -i -p local1.info" f5-combined
  ErrorLog  "|/usr/bin/logger -t apache2-error-www.example.com -i -p local1.error"

  <Directory "/sites/drupal-composed/public/">
    AllowOverride All

    <IfModule mod_rewrite.c>
      Options +FollowSymLinks
      Options +Indexes

      # FIRE UP THE ENGINES, CAPTAIN
      RewriteEngine On

      # NOTE: For the Drupal Scheduler module
      # If we have scheduled asset paths, route them to the drupal index
      RewriteCond %{REQUEST_FILENAME} -s
      RewriteRule ^(/?(en|fr|de)/?)?sites/default/files/unpublished(.+\.(jpg|jpeg|gif|png|txt|pdf|mp3|mov|m4v|mp4|mpeg|avi|wmv))$ index.php?relpath=$3 [NC,L]
      RewriteCond %{REQUEST_FILENAME} -s
      RewriteRule ^(/?(en|fr|de)/?)?sites/default/files/styles/[^/]+/public/unpublished(.+\.(jpg|jpeg|gif|png|txt|pdf|mp3|mov|m4v|mp4|mpeg|avi|wmv))$ index.php?relpath=$3 [NC,L]

      # Now check for an existing file/image/directory
      # If found, just return that asset
      RewriteCond %{REQUEST_FILENAME} -s [OR]
      RewriteCond %{REQUEST_FILENAME} -l
      RewriteRule ^.*$ - [NC,L]

      # make sure that /en/ is at the start of the URL
      # RewriteCond %{REQUEST_URI} !^/index.php$
      # RewriteCond %{REQUEST_URI} !^/(en|fr|de)/?.*$
      # RewriteRule ^/?(.*) /en/$1 [R,NE,L]

      # if we get this far, hand it off to drupal (the root index.php script)
      RewriteRule ^.*$ index.php [NC,L]
    </IfModule>

    AllowOverride None

    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>