Skip to content

Commit 081f700

Browse files
authored
Merge branch 'graycoreio:main' into feature/support-mailpit-for-local-email
2 parents c918024 + 087f82e commit 081f700

43 files changed

Lines changed: 1045 additions & 288 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
2+
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
3+
# $$ Code Owners $$
4+
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
5+
# $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
6+
#
7+
# The configuration for Code Owners for graycoreio/magento2-devcontainer.
8+
#
9+
# For more info see: https://help.github.com/articles/about-codeowners/
10+
#
11+
12+
13+
# ================================================
14+
# Concepts
15+
# ================================================
16+
#
17+
# A CodeOwner should only review what they are comfortable reviewing. If you're not comfortable, say something.
18+
# It is a CodeOwners responsibility to only accept the changes that they understand and deem necessary.
19+
# The CodeOwners have final say on whether or not code is accepted.
20+
# If multiple CodeOwners are listed, ALL code owners must approve the PR prior to merge.
21+
# CodeOwners work in conjunction with Github's "Number of Required Approvals (1)" requirement.
22+
23+
24+
25+
# ================================================
26+
# GitHub username registry
27+
# ================================================
28+
29+
# damienwebdev - Damien Retzinger
30+
31+
32+
######################################################################################################
33+
#
34+
# CODEOWNERS rules
35+
# -----------------
36+
#
37+
# All the following rules are applied in the order specified in this file.
38+
# The last rule that matches wins!
39+
#
40+
# See https://git-scm.com/docs/gitignore#_pattern_format for pattern syntax docs.
41+
#
42+
######################################################################################################
43+
44+
45+
# ================================================
46+
# Default Owners
47+
# ================================================
48+
49+
* @damienwebdev

.github/workflows/ci.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,37 @@ name: CI
33
on:
44
push:
55
branches: [main]
6+
paths-ignore:
7+
- 'docs/**'
68

79
jobs:
10+
supported-version:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
matrix: ${{ steps.supported-version.outputs.matrix }}
14+
steps:
15+
- uses: graycoreio/github-actions-magento2/supported-version@v5.1.0
16+
id: supported-version
17+
18+
supported-version-latest:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
matrix: ${{ steps.supported-version.outputs.matrix }}
22+
steps:
23+
- uses: graycoreio/github-actions-magento2/supported-version@v5.1.0
24+
id: supported-version
25+
with:
26+
kind: latest
27+
828
# Test with existing Magento project (user has PHP/Composer locally)
929
test-existing-project:
30+
needs: supported-version
1031
runs-on: ubuntu-latest
1132
strategy:
1233
fail-fast: false
13-
matrix:
14-
include:
15-
- magento_version: ">=2.4.6 <2.4.7"
16-
repository_url: "https://mirror.mage-os.org/"
17-
stability: ""
18-
- magento_version: ">=2.4.7 <2.4.8"
19-
repository_url: "https://mirror.mage-os.org/"
20-
stability: ""
21-
- magento_version: ">=2.4.8 <2.4.9"
22-
repository_url: "https://mirror.mage-os.org/"
23-
stability: ""
24-
25-
name: Existing Project ${{ matrix.name || matrix.magento_version }}
34+
matrix: ${{ fromJSON(needs.supported-version.outputs.matrix) }}
35+
36+
name: Existing Project ${{ matrix.magento }}
2637

2738
steps:
2839
- name: Set up Docker Buildx
@@ -34,12 +45,11 @@ jobs:
3445
- name: Create Magento project
3546
run: |
3647
composer create-project --no-install \
37-
--repository-url=${{ matrix.repository_url }} \
38-
${{ matrix.stability && format('--stability {0}', matrix.stability) || '' }} \
39-
magento/project-community-edition${{ matrix.magento_version && format(':"{0}"', matrix.magento_version) || '' }} test-project
48+
--repository-url=https://mirror.mage-os.org/ \
49+
"${{ matrix.magento }}" test-project
4050
4151
- name: Checkout devcontainer
42-
uses: actions/checkout@v4
52+
uses: actions/checkout@v6
4353
with:
4454
path: test-project/.devcontainer/magento2-devcontainer
4555

@@ -120,8 +130,11 @@ jobs:
120130
121131
# Test fresh install (user only has Docker/VS Code, no PHP/Composer)
122132
test-fresh-install:
133+
needs: supported-version-latest
123134
runs-on: ubuntu-latest
124-
name: Fresh Install (latest)
135+
strategy:
136+
matrix: ${{ fromJSON(needs.supported-version-latest.outputs.matrix) }}
137+
name: Fresh Install ${{ matrix.magento }}
125138

126139
steps:
127140
- name: Set up Docker Buildx
@@ -131,7 +144,7 @@ jobs:
131144
run: npm install -g @devcontainers/cli
132145

133146
- name: Checkout devcontainer
134-
uses: actions/checkout@v4
147+
uses: actions/checkout@v6
135148
with:
136149
path: .devcontainer/magento2-devcontainer
137150

@@ -179,7 +192,7 @@ jobs:
179192
devcontainer exec --workspace-folder . bash -c '
180193
composer create-project \
181194
--repository-url=https://mirror.mage-os.org/ \
182-
magento/project-community-edition /tmp/magento && \
195+
"${{ matrix.magento }}" /tmp/magento && \
183196
cp -r /tmp/magento/. /workspace/ && \
184197
rm -rf /tmp/magento
185198
'

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v5
31+
uses: actions/checkout@v6
3232
with:
3333
fetch-depth: 0
3434
- name: Setup Node
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: googleapis/release-please-action@v4
13+
with:
14+
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}

.github/workflows/sync-starter.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sync Starter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: sync-starter
10+
cancel-in-progress: true
11+
12+
jobs:
13+
sync-starter:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout starter repo
17+
uses: actions/checkout@v6
18+
with:
19+
repository: graycoreio/magento2-devcontainer-starter
20+
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
21+
submodules: true
22+
23+
- name: Update submodule
24+
working-directory: .devcontainer/magento2-devcontainer
25+
run: |
26+
git fetch origin main
27+
git checkout origin/main
28+
29+
- name: Remove existing generated files
30+
working-directory: .devcontainer
31+
run: |
32+
find . -maxdepth 1 -not -name 'magento2-devcontainer' -not -name '.' -exec rm -rf {} +
33+
34+
- name: Run init.sh
35+
run: |
36+
printf '\n\n' | .devcontainer/magento2-devcontainer/bin/init.sh
37+
38+
- name: Commit and push
39+
env:
40+
GRAYBOT_GPG_KEY: ${{ secrets.GRAYBOT_GPG_KEY }}
41+
run: |
42+
echo "$GRAYBOT_GPG_KEY" | gpg --batch --import
43+
export GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d/ -f2)
44+
45+
git config --global user.signingkey $GPG_KEY_ID
46+
git config --global commit.gpgSign true
47+
git config --global user.email "automation@graycore.io"
48+
git config --global user.name "Beep Boop"
49+
git add -A
50+
if ! git diff --staged --quiet; then
51+
git commit -m "chore: sync devcontainer ${GITHUB_SHA::7}"
52+
git push
53+
fi

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.1.0"
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Graycore, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,31 @@
1-
# Magento 2 DevContainer
1+
<p align="center">
2+
<img src="docs/public/logo.svg" alt="Magento 2 Devcontainer" width="120" />
3+
</p>
24

3-
This devcontainer provides a complete development environment for Magento 2 that meets [Adobe's official system requirements](https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements).
5+
<h1 align="center">Magento 2 Devcontainer</h1>
46

5-
## Prerequisites
7+
<p align="center">
8+
A production-like devcontainer environment for Magento 2.
9+
</p>
610

7-
- [VSCode](https://code.visualstudio.com/) (or an editor that supports devcontainers)
8-
- [Docker](https://www.docker.com/products/docker-desktop/)
9-
- [Github Codespaces](https://github.com/features/codespaces) (Optional)
11+
<p align="center">
12+
<a href="https://github.com/graycoreio/magento2-devcontainer/blob/main/LICENSE"><img src="https://img.shields.io/github/license/graycoreio/magento2-devcontainer" alt="License" /></a>
13+
<a href="https://github.com/graycoreio/magento2-devcontainer/stargazers"><img src="https://img.shields.io/github/stars/graycoreio/magento2-devcontainer" alt="Stars" /></a>
14+
<a href="https://hub.docker.com/r/mappia/magento-php"><img src="https://img.shields.io/docker/pulls/mappia/magento-php" alt="Docker Pulls" /></a>
15+
</p>
1016

11-
## Installed tools
17+
<h3 align="center">Supported Versions</h3>
18+
<p align="center">
19+
<a href="compose/2.4.6/docker-compose.yml"><code>2.4.6</code></a> · <a href="compose/2.4.7/docker-compose.yml"><code>2.4.7</code></a> · <a href="compose/2.4.8/docker-compose.yml"><code>2.4.8</code></a> · <a href="compose/2.4.9/docker-compose.yml"><code>2.4.9 (beta)</code></a>
20+
</p>
1221

13-
### Devcontainer Features (You control)
14-
- [Claude Code](https://code.claude.com/docs/en/overview)
15-
- [Github CLI](https://cli.github.com/)
22+
---
1623

17-
### Container built-ins
18-
- [n98-magerun2](https://github.com/netz98/n98-magerun2)
19-
- [composer](https://getcomposer.org/)
20-
- [Xdebug](https://xdebug.org/)
24+
## Documentation
2125

22-
## Supported Versions
26+
Visit **[devcontainer.mappia.io](https://devcontainer.mappia.io)** for the full documentation, including:
2327

24-
This environment will support all of the currently supported Magento versions. There are multiple configurations available (one for each major version of Magento).
25-
26-
| Magento Version | Configuration |
27-
| --------------- | ----------------------------------------------------------- |
28-
| v2.4.6 | [compose/2.4.6/docker-compose.yml](compose/2.4.6/docker-compose.yml) |
29-
| v2.4.7 | [compose/2.4.7/docker-compose.yml](compose/2.4.7/docker-compose.yml) |
30-
| v2.4.8 | [compose/2.4.8/docker-compose.yml](compose/2.4.8/docker-compose.yml) |
31-
| v2.4.9 | [compose/2.4.9/docker-compose.yml](compose/2.4.9/docker-compose.yml) |
32-
33-
## Getting Started
34-
35-
1. Make a .devcontainer folder in your project
36-
37-
```bash
38-
mkdir -p .devcontainer
39-
```
40-
41-
2. Add this repository as a git submodule to your Magento project:
42-
43-
```bash
44-
git submodule add https://github.com/graycoreio/magento2-devcontainer.git .devcontainer/magento2-devcontainer
45-
```
46-
47-
3. Run the `init` script
48-
49-
```bash
50-
/bin/bash .devcontainer/magento2-devcontainer/bin/init.sh
51-
```
52-
53-
> [!INFO]
54-
> If you're on Windows (and not using WSL2) and don't have access to bash, you can simply get away with copying the sample
55-
> `devcontainer.json.sample`, `docker-compose.overrides.yml` and making a simple `docker-compose.yml` with the following content into your .devcontainer folder:
56-
57-
```yml
58-
services: {}
59-
```
60-
61-
4. Open the project in VS Code and click "Reopen in Container" when prompted.
62-
63-
5. (Optional) Run the `setup` script
64-
```bash
65-
/bin/bash .devcontainer/magento2-devcontainer/bin/setup-install.sh
66-
```
67-
68-
69-
## Additional Resources
70-
71-
- [Magento 2 DevDocs](https://developer.adobe.com/commerce/docs/)
72-
- [Magento Release Notes](https://experienceleague.adobe.com/docs/commerce-operations/release/notes/overview.html)
73-
- [System Requirements](https://experienceleague.adobe.com/en/docs/commerce-operations/installation-guide/system-requirements)
28+
- [Getting Started](https://devcontainer.mappia.io/getting-started.html)
29+
- [Services](https://devcontainer.mappia.io/services/)
30+
- [Features](https://devcontainer.mappia.io/features/xdebug.html)
31+
- [Customization](https://devcontainer.mappia.io/customization/docker-compose.html)

devcontainer.json.sample

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@
5757
"ghcr.io/devcontainers/features/node:1": {
5858
"installYarnUsingApt": false
5959
},
60-
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}
60+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
61+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
62+
"moby": false
63+
},
64+
"ghcr.io/devcontainers-extra/features/npm-package:1": {
65+
"package": "@mappia/speedscope"
66+
}
6167
},
6268
"hostRequirements": {
6369
"cpus": 4,

0 commit comments

Comments
 (0)