Skip to content

Commit 35e8694

Browse files
committed
chore: init starter (2026-07-20)
0 parents  commit 35e8694

9,082 files changed

Lines changed: 1371813 additions & 0 deletions

File tree

Some content is hidden

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

.devcontainer/.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPOSE_PROJECT_NAME="mage-os-ai-starter-daffodil"

.devcontainer/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
docker-compose.local.yml

.devcontainer/bin/forward-ports.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -u
3+
4+
# postStartCommand reaps this hook's process tree the moment it returns, which
5+
# kills the last bridge we background before it finishes detaching: 8000 has the
6+
# 8025 wait loop to settle in, but 8025 launches just as the script exits and
7+
# gets reaped. Re-exec the whole worker in its own detached session once so the
8+
# hook returns immediately; the bridges below are then children of a session
9+
# reparented to PID 1 and nothing tears them down on hook completion.
10+
if [ -z "${_FWD_DETACHED:-}" ]; then
11+
_FWD_DETACHED=1 setsid -f "$0" "$@" </dev/null >/tmp/forward-ports.log 2>&1
12+
exit 0
13+
fi
14+
15+
bridge() { # $1=local port $2=target host:port
16+
for p in /proc/[0-9]*; do read -r c < "$p/comm" 2>/dev/null || continue
17+
[ "$c" = socat ] && grep -qa "TCP-LISTEN:$1," "$p/cmdline" 2>/dev/null && kill "${p#/proc/}" 2>/dev/null
18+
done
19+
for _ in $(seq 1 30); do # wait for the sibling to boot
20+
socat -T1 - "TCP:$2" </dev/null >/dev/null 2>&1 && break; sleep 1
21+
done
22+
socat TCP-LISTEN:"$1",fork,reuseaddr "TCP:$2" </dev/null >"/tmp/socat-$1.log" 2>&1 &
23+
}
24+
bridge 8000 nginx:8000
25+
bridge 8025 mailpit:8025
26+
echo "port bridges started"

.devcontainer/devcontainer.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"name": "mage-os-ai-starter-daffodil",
3+
"dockerComposeFile": [
4+
"docker-compose.yml",
5+
"magento2-devcontainer/compose/mage-os/3.0.0/docker-compose.yml",
6+
"docker-compose.shared.yml",
7+
"docker-compose.local.yml"
8+
],
9+
"workspaceFolder": "/workspace",
10+
"service": "php",
11+
"forwardPorts": [
12+
8000,
13+
8025,
14+
4200
15+
],
16+
"initializeCommand": {
17+
"submodules": "[ -f .devcontainer/magento2-devcontainer/.gitignore ] || git submodule update --init --recursive",
18+
"env": "[ -f .devcontainer/.env ] || cp .devcontainer/.env.sample .devcontainer/.env",
19+
"local-compose": "[ -f .devcontainer/docker-compose.local.yml ] || cp .devcontainer/docker-compose.local.yml.sample .devcontainer/docker-compose.local.yml"
20+
},
21+
"updateContentCommand": {
22+
"composer": "cd magento && [ -f vendor/autoload.php ] || composer install --no-interaction --prefer-dist",
23+
"npm": "cd daffodil && [ -f node_modules/.package-lock.json ] || npm ci"
24+
},
25+
"postCreateCommand": ".devcontainer/magento2-devcontainer/bin/setup-install.sh | bash",
26+
"postStartCommand": {
27+
"forward-ports": "/bin/bash .devcontainer/bin/forward-ports.sh"
28+
},
29+
"portsAttributes": {
30+
"8000": {
31+
"label": "Magento 2 Storefront (nginx)",
32+
"onAutoForward": "silent"
33+
},
34+
"8025": {
35+
"label": "Mailpit",
36+
"onAutoForward": "silent"
37+
},
38+
"4200": {
39+
"label": "Daffodil (Angular) dev server",
40+
"onAutoForward": "notify"
41+
}
42+
},
43+
"otherPortsAttributes": {
44+
"onAutoForward": "ignore"
45+
},
46+
"customizations": {
47+
"vscode": {
48+
"extensions": [
49+
"angular.ng-template",
50+
"dbaeumer.vscode-eslint",
51+
"esbenp.prettier-vscode",
52+
"bmewburn.vscode-intelephense-client",
53+
"xdebug.php-debug"
54+
]
55+
}
56+
},
57+
"remoteUser": "dev",
58+
"features": {
59+
"ghcr.io/devcontainers/features/git:1": {},
60+
"ghcr.io/devcontainers/features/github-cli:1": {},
61+
"ghcr.io/devcontainers/features/node:1": {
62+
"version": "24",
63+
"installYarnUsingApt": false
64+
},
65+
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {},
66+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
67+
"moby": false
68+
}
69+
},
70+
"hostRequirements": {
71+
"cpus": 4,
72+
"memory": "8gb"
73+
}
74+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Loaded last so a local .devcontainer/.env (gitignored) can override secrets
2+
# without touching the committed .env.sample.
3+
services:
4+
php:
5+
env_file: .env
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Overrides the upstream magento2-devcontainer compose for the Daffodil
2+
# starter's monorepo layout: the repo root contains magento/ and daffodil/,
3+
# so we mount the whole repo at /workspace and point Magento services at
4+
# /workspace/magento. Angular work happens at /workspace/daffodil with
5+
# `ng serve` listening on 4200 (forwarded by devcontainer.json).
6+
services:
7+
php:
8+
volumes:
9+
- ../:/workspace:cached
10+
working_dir: /workspace/magento
11+
env_file: .env.sample
12+
# Expose the Daffodil dev server (ng serve --host 0.0.0.0) on the host.
13+
# devcontainer.json's forwardPorts: [4200] handles this from VS Code, but
14+
# explicit ports: makes it work for `devcontainer up` / raw `docker compose`
15+
# too — handy in CI and for quick smoke tests outside the editor.
16+
ports:
17+
- "4200:4200"
18+
nginx:
19+
environment:
20+
- MAGE_ROOT_DIR=/workspace/magento
21+
volumes:
22+
- ../:/workspace:cached
23+
- ./magento2-devcontainer/nginx/default:/etc/nginx/templates
24+
- ./magento2-devcontainer/nginx/fastcgi_params:/etc/nginx/fastcgi_params:ro

.devcontainer/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
services: {}
Submodule magento2-devcontainer added at 2118700

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Basic dependabot.yml — keeps GitHub Actions and composer dependencies fresh.
2+
# The mirror.mage-os.org repository is declared in composer.json's "repositories"
3+
# field (added by `composer create-project --repository-url=…`), so Dependabot
4+
# picks it up automatically — no explicit `registries:` entry needed.
5+
version: 2
6+
updates:
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "daily"
11+
- package-ecosystem: "composer"
12+
directory: "/magento"
13+
schedule:
14+
interval: "weekly"
15+
# Ignore test fixtures and update tool manifests that
16+
# are not actually used in production
17+
exclude-paths:
18+
- "dev/tests/**"
19+
- "update/**"

.github/workflows/check-store.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Check Store
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
check-store:
12+
uses: graycoreio/github-actions-magento2/.github/workflows/check-store.yaml@v8.9.0
13+
with:
14+
path: "magento"
15+
secrets:
16+
composer_auth: ${{ secrets.COMPOSER_AUTH }}

0 commit comments

Comments
 (0)