Skip to content

Commit d15ca86

Browse files
committed
docs: add validation step to from-scratch guide
1 parent 068414a commit d15ca86

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

docs/getting-started/from-scratch.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ code magento2-devcontainer-starter
3939

4040
![Reopen in Container prompt](/devcontainer-init.webp)
4141

42-
43-
4442
3. Create the Magento project inside the container:
4543

4644
```bash
@@ -74,8 +72,14 @@ Do not commit `vendor` to source control (with the exception of `vendor/.htacces
7472
rm -rf .git
7573
git init
7674
git add .
75+
git rm --cached .devcontainer/magento2-devcontainer -r
76+
rm -rf .devcontainer/magento2-devcontainer
77+
git submodule add https://github.com/graycoreio/magento2-devcontainer.git .devcontainer/magento2-devcontainer
78+
7779
git commit -m "chore: init Magento project"
7880
git branch -M main
81+
82+
# (!) Adjust this line based upon your Github project's information
7983
git remote add origin ...
8084
git push
8185
```
@@ -86,13 +90,31 @@ git push
8690
.devcontainer/magento2-devcontainer/bin/setup-install.sh | bash
8791
```
8892

89-
6. Verify the installation:
93+
6. Reload the nginx service:
94+
95+
```bash
96+
docker exec magento2-devcontainer-nginx-1 nginx -s reload
97+
```
98+
99+
7. Verify the installation:
90100

91101
```bash
92102
bin/magento --version
93103
```
94104

95-
7. Cleanup resources for the environment
105+
8. View the app in your browser
106+
107+
Navigate to the **Ports** tab in VS Code and click **Open in Browser** on the Nginx port.
108+
109+
![VS Code Ports tab](/view-in-browser.webp)
110+
111+
You should see the default Magento Luma homepage.
112+
113+
![Luma homepage](/luma-homepage.webp)
114+
115+
116+
117+
9. Cleanup resources for the environment
96118

97119
:::info
98120
This is only necessary if you never plan to use the devcontainer again. To return to the environment later, simply close VS Code and reopen the devcontainer to start where you left off.
@@ -109,7 +131,7 @@ docker ps -a --format '{{.ID}} {{.Names}}' \
109131
## Stop and remove those containers
110132
docker ps -a --format '{{.ID}} {{.Names}}' \
111133
| awk '$2 ~ /^magento2-devcontainer-/ {print $1}' \
112-
| xargs -r docker rm
134+
| xargs -r docker rm -f
113135

114136
## List the relevant volumes for review.
115137
docker volume ls --format '{{.Name}}' \

docs/public/luma-homepage.webp

5.97 KB
Loading

docs/public/view-in-browser.webp

15.1 KB
Loading

0 commit comments

Comments
 (0)