Skip to content

Commit 570966d

Browse files
rfayclaude
andauthored
docs: Give better instructions for WSL2 users to work inside distro (#428)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent ff745f6 commit 570966d

File tree

1 file changed

+112
-4
lines changed

1 file changed

+112
-4
lines changed

src/components/quickstart/Windows.astro

Lines changed: 112 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
---
22
import Terminal from "@components/Terminal.astro"
33
import CommunityCTA from "./CommunityCTA.astro"
4-
import Examples from "./Examples.astro"
54
import CtaButton from "@components/CtaButton.astro"
65
6+
// Set the props for the "Create a Project" section
7+
const itemNumber = "3/3";
8+
const terminalType = "powershell-ubuntu";
9+
const terminalSymbol = "$";
10+
711
export interface Props {
812
latestVersion: string
913
}
@@ -60,11 +64,11 @@ const { latestVersion } = Astro.props
6064
href={`https://github.com/ddev/ddev/releases/download/${latestVersion}/ddev_windows_amd64_installer.${latestVersion}.exe`}
6165
/>
6266
</div>
63-
67+
6468
<p>Run the installer selecting the preferred "Docker CE" approach and selecting your "DDEV" distro. You can also find all releases at <a href="https://github.com/ddev/ddev/releases">DDEV Releases</a>.</p>
6569

6670
<p>
67-
In the “DDEV” terminal app or Windows Terminal, confirm that the <code>ddev</code> binary is
71+
In the “DDEV” terminal app or Windows Terminal "DDEV" profile, confirm that the <code>ddev</code> binary is
6872
installed: 🎉
6973
</p>
7074
<Terminal
@@ -73,7 +77,111 @@ const { latestVersion } = Astro.props
7377
/>
7478
</div>
7579

76-
<Examples itemNumber="3/3" terminalType="powershell-ubuntu" terminalSymbol="$" />
80+
<div class="prose dark:prose-invert">
81+
<h2 class="text-3xl mt-24">
82+
<small class="block font-mono text-xs text-gray-500">{itemNumber}</small>Create a
83+
Project
84+
</h2>
85+
86+
<p>Tip: Watch the <a href="/blog/watch-ddev-local-from-scratch-with-windows-wsl2/">video tutorial</a> showing all of this.</p>
87+
88+
<p><strong>Important:</strong> Work inside the WSL2 "DDEV" distro, not on your Windows C:\ drive. Open the "DDEV" app from your Start menu to access the Linux terminal.</p>
89+
90+
<p>To view files from Windows Explorer or your IDE: <code>Explorer > Linux > DDEV > home > [your-username]</code></p>
91+
92+
<p>Create a directory for your project:</p>
93+
<Terminal type={terminalType} code={`${terminalSymbol} mkdir -p ~/dev/my-project && cd ~/dev/my-project`} />
94+
95+
<p>
96+
Initialize the project by running the <a
97+
href="https://docs.ddev.com/en/stable/users/usage/commands/#config"
98+
target="_blank"
99+
><code>ddev config</code></a>
100+
command:
101+
</p>
102+
<Terminal type={terminalType} code={`${terminalSymbol} ddev config`} />
103+
104+
<p>
105+
Start the project for the first time. You'll use the same command to start
106+
it later, too!
107+
</p>
108+
<Terminal type={terminalType} code={`${terminalSymbol} ddev start`} />
109+
110+
<p>
111+
If it's a Composer project, you may also need to run <a
112+
href="https://docs.ddev.com/en/stable/users/usage/commands/#composer"
113+
target="_blank"
114+
><code>ddev composer install</code></a>.
115+
</p>
116+
117+
<p>
118+
Now run the <a
119+
href="https://docs.ddev.com/en/stable/users/usage/commands/#launch"
120+
target="_blank">launch command</a
121+
> to open your project in a browser:
122+
</p>
123+
<Terminal type={terminalType} code={`${terminalSymbol} ddev launch`} />
124+
</div>
125+
126+
<div class="prose dark:prose-invert">
127+
<h2 class="text-3xl mt-24">Explore & Enjoy!</h2>
128+
129+
<p>
130+
Take a peek at your project's new <code>.ddev/</code> directory. You can add
131+
this to your repo to share your DDEV config, edit <code
132+
>.ddev/config.yaml</code
133+
> to change <a
134+
href="https://docs.ddev.com/en/stable/users/configuration/config/"
135+
target="_blank"
136+
>project options</a
137+
>, or even go about your business and pretend this folder doesn't exist.
138+
</p>
139+
140+
<p>
141+
Run the <a
142+
href="https://docs.ddev.com/en/stable/users/usage/commands/#help"
143+
target="_blank"
144+
>help command</a>
145+
(or plain <code>ddev</code>) to see the actions you can take with the CLI:
146+
</p>
147+
148+
<Terminal type={terminalType} code={`${terminalSymbol} ddev -h`} />
149+
150+
<p>
151+
Use the <a
152+
href="https://docs.ddev.com/en/stable/users/usage/commands/#describe"
153+
target="_blank"
154+
>describe command</a>
155+
to see a project's parts and database connection details:
156+
</p>
157+
158+
<Terminal type={terminalType} code={`${terminalSymbol} ddev describe`} />
159+
160+
<p>
161+
If you're done working on a project and want to shut it down without
162+
removing anything, use the <a
163+
href="https://docs.ddev.com/en/stable/users/usage/commands/#stop"
164+
target="_blank"
165+
>stop command</a>:
166+
</p>
167+
168+
<Terminal type={terminalType} code={`${terminalSymbol} ddev stop`} />
169+
170+
<p>
171+
If you were just kicking the tires and you want to permanently delete the
172+
project and its resources without touching your code, run the <a
173+
href="https://docs.ddev.com/en/stable/users/usage/commands/#delete"
174+
target="_blank"
175+
>delete command</a>:
176+
</p>
177+
178+
<Terminal type={terminalType} code={`${terminalSymbol} ddev delete`} />
179+
180+
<p>
181+
DDEV will remove everything it created for the project and have no memory of
182+
its existence.
183+
</p>
184+
</div>
77185

78186
<div class="prose dark:prose-invert">
79187
<p></p>

0 commit comments

Comments
 (0)