LoginSignup
15
9

More than 3 years have passed since last update.

EC-CUBE4 初回デプロイ

Last updated at Posted at 2018-12-12

概要

すでにプラグイン追加済みのプロジェクトを別の環境にインストールしようと思ったところ、外部ライブラリ・プラグインをうまくインストールすることができなかったので、インストールできる方法を考えてみました。

プラグインなしの作業手順

  1. composer install を実行
composer install

プラグインありの作業手順

EC-CUBE4.0.1の例

1. 外部ライブラリの準備

wget https://raw.githubusercontent.com/EC-CUBE/ec-cube/4.0.1/composer.json -O composer-core-4-0-1.json
wget https://raw.githubusercontent.com/EC-CUBE/ec-cube/4.0.1/composer.lock -O composer-core-4-0-1.lock

COMPOSER=composer-core-4-0-1.json composer install --no-scripts

composer.json には、追加プラグインの情報やEC-CUBEのプライベートリポジトリの情報が含まれているので、通常の composer install ではインストールできません。

2. EC-CUBEインストラーの実行

3. マイグレーションの実行

bin/console doctrine:migrations:migrate

※この時点では、プラグインが適用されていない状態のEC-CUBE4が動きます

4. EC-CUBEブラグインのダウンロード

# EC-CUBEプラグインのダウンロード
bin/console eccube:composer:install

# Autoloaderの生成
composer install

5. EC-CUBEプラグインの有効化

# 独自プラグインの場合
bin/console eccube:plugin:install --code=プラグインコード
bin/console eccube:plugin:enable --code=プラグインコード

# オーナーストアプラグインの場合
bin/console eccube:plugin:enable --code=プラグインコード

composer.json の情報を別の環境に反映

以下のコマンドで適用する。
bin/console eccube:composer:require-already-installed

外部ライブラリを使っている場合には個別に再度反映する
composer require psr/http-message

15
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
9