EC-CUBE / EC-CUBE/doc4.ec-cube.net

Docker Compose インストール手順にアクセス先 URL を追記したい(4.4 以降は HTTPS 必須)

Open
#363 0 comments 0 reactions 0 assignees View on GitHub
documentation installation
Dominant language
HTML
Stars
16
Forks
63
PR merge metrics
No merged PRs in 30d

Description

## 概要(Overview)

[Docker Composeを使用してインストールする](https://doc4.ec-cube.net/quickstart/docker_compose_install) に **起動後のアクセス先 URL の記載がありません**。

さらに EC-CUBE 4.4 以降は、`docker-compose.yml` が公開している 2 つのポートのうち **HTTP 側(`http://localhost:8080`)ではログインできません**。初めて Docker 環境を立ち上げた開発者が、ログイン画面までは表示できるのにログインできず原因が分からない、という状態になります。

## 期待する内容(Expect) or 要望 (Requirement)

`docker compose up -d` と `eccube:install` の手順のあとに「アクセスする」小節を追加し、次を記載したい。

1. **アクセス先**
- 店舗: `https://127.0.0.1:4430/`
- 管理画面: `https://127.0.0.1:4430/admin`
- `docker-compose.yml` の `ports` は `8080:80` と `4430:443` の 2 つ。
2. **4.4 以降は HTTPS が必須である理由**(下記「根拠」)
3. **自己署名証明書の警告について**
- コンテナは Apache の snakeoil 証明書を使うため、ブラウザに「保護されていない通信」警告が出る。開発用途ならそのまま進めて差し支えない。
- 警告を消したい場合の `mkcert` を使った証明書差し替え手順(任意項目)。発行した証明書はコミットしない旨の注記つき。

## 根拠(Reference)

- ポート: [`docker-compose.yml`](https://github.com/EC-CUBE/ec-cube/blob/4.4/docker-compose.yml) の `ports` に `- 8080:80` / `- 4430:443`
- セッションクッキー: 4.4 の [`app/config/eccube/packages/framework.yaml`](https://github.com/EC-CUBE/ec-cube/blob/4.4/app/config/eccube/packages/framework.yaml) が `cookie_samesite: none` + `cookie_secure: auto`
- `SameSite=None` のクッキーはブラウザ仕様上 `Secure` 属性が必須。HTTP 接続では `cookie_secure: auto` により `Secure` が付かないため、クッキーが破棄されセッションが維持できない。
- **4.3 以前は HTTP でもログインできていた**: 4.3 までは `Eccube\Session\Storage\Handler\SameSiteNoneCompatSessionHandler` が接続が HTTPS のときだけ `SameSite=None` を送っていたため、HTTP では通常のクッキーが発行されていた。4.4 でこのハンドラが削除され、設定値で常時 `none` を指定する形になった(`adc756fd08`)。

したがって、記載は **4.4 以降の挙動**として書き分けるのが正確です(4.3 以前の手順ページでは `http://localhost:8080` のままで問題ありません)。4.4 は未リリースのため、反映タイミングは 4.4 リリースに合わせる形で問題ないと思います。

## 補足(Appendix)

- 本件はもともと本体リポジトリの README に追記する PR として出しましたが([EC-CUBE/ec-cube#6944](https://github.com/EC-CUBE/ec-cube/pull/6944))、レビューで「詳細は doc4 に記載すべき」との方針になったため、こちらに起票しました。記載内容の草案は当該 PR の差分がそのまま使えます。
- 併せて本体側で「`docker-compose.yml` の `- 8080:80` を削除してはどうか」という案も出ています([該当コメント](https://github.com/EC-CUBE/ec-cube/pull/6944#issuecomment-4999046593))。これが採用されればアクセス先は HTTPS 一本になり、ドキュメントも「HTTP ではログインできない」の説明が不要になります。本体側の判断が決まってから執筆したほうが手戻りがありません。
- 執筆は私(@ttokoro20240902)が担当できます。上記の書き分け方針で問題なければ PR を出します。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Docker Compose installation page linked in the issue and compare its instructions with docker-compose.yml and app/config/eccube/packages/framework.yaml from the 4.4 reference. Review EC-CUBE/ec-cube#6944 before writing, since the upstream port decision may change the guidance. Done means the page explains the HTTPS URLs, the 4.4 cookie behavior, certificate warning, and optional mkcert steps without committing certificates.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.