Merge pull request #237 from ScottLozano/patch-2

Update index.md
This commit is contained in:
Stefan Scherer 2022-02-09 11:59:45 +01:00 committed by GitHub
commit f1f2012af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,6 +111,8 @@ For now, we will create the network first and attach the MySQL container at star
Hooray! We have our `todos` database and it's ready for us to use! Hooray! We have our `todos` database and it's ready for us to use!
To exit the sql terminal type `exit` in the terminal.
## Connecting to MySQL ## Connecting to MySQL
@ -204,6 +206,20 @@ With all of that explained, let's start our dev-ready container!
sh -c "yarn install && yarn run dev" sh -c "yarn install && yarn run dev"
``` ```
If you updated your docker file in the Bind Mount section of the tutorial use the updated command:
```bash hl_lines="3 4 5 6 7"
docker run -dp 3000:3000 \
-w /app -v "$(pwd):/app" \
--network todo-app \
-e MYSQL_HOST=mysql \
-e MYSQL_USER=root \
-e MYSQL_PASSWORD=secret \
-e MYSQL_DB=todos \
node:12-alpine \
sh -c "apk --no-cache --virtual build-dependencies add python2 make g++ && yarn install && yarn run dev"
```
If you are using PowerShell then use this command. If you are using PowerShell then use this command.
```powershell hl_lines="3 4 5 6 7" ```powershell hl_lines="3 4 5 6 7"