Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support For Visual Studio Code #141

Merged
merged 3 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Database Setup
parent: Getting Started
nav_order: 2
nav_order: 3
has_children: true
---

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: OWS Starter Project
parent: Getting Started
nav_order: 3
nav_order: 4
has_children: true
---

Expand Down
98 changes: 98 additions & 0 deletions docs/getting-started/visual-studio-code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
layout: default
title: Visual Studio Code
parent: Getting Started
nav_order: 2
---

# Docker Setup

## Requirements
* Download or clone [OWS](https://github.com/Dartanlla/OWS)
* Download and install [Visual Studio Code](https://code.visualstudio.com/)
* [C# Dev Kit](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) extension is required
* [Docker for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker) extension is required
* Download and install [Docker Desktop](https://www.docker.com/products/docker-desktop) for Windows/macOS/Linux
* [.Net 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
* Enable "Virtualization Technology" in your BIOS
<br />
<br />

<details open markdown="block">
<summary class="fs-6 mb-3">
Windows
</summary>

1. Make sure Windows Subsystem for Linux is installed. ![Launch Docker Compose](images/windows-subsystem-for-linux01.png){: .mt-3}
2. Download and install [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop)
3. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
4. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
5. Select Windows Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
6. <span class="label" style="margin-left: -3px">Optional</span>
Running Docker Compose without Visual Studio Code, Enter the following Command Prompt from the OWS root directory.

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.windows.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.windows.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

<details markdown="block">
<summary class="fs-6 mb-3">
macOS
</summary>

1. Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/)
2. Run the following command in a terminal to install the Development Certificates

```bash
dotnet dev-certs https --trust
```

3. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
4. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
5. Select macOS Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
5. <span class="label" style="margin-left: -3px">Optional</span>
Running Docker Compose without Visual Studio Code, Run the following command in an terminal from the OWS root directory.

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.osx.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
docker-compose -f docker-compose.yml -f docker-compose.override.osx.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

<details markdown="block">
<summary class="fs-6 mb-3">
Linux
</summary>

1. Download and install [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/)
2. Close all web browsers
3. Download and Run [dotnet-dev-certificate-linux](https://github.com/CodewareGames/dotnet-dev-certificate-linux) to install Development HTTPS Certificate.
4. Open the src folder inside the OWS Project folder and open it with Visual Studio Code.
5. Select View -> Command Palette, Type Docker Compose Up select docker-compose.xml as the compose file.
6. Select Linux Template File ![Launch Docker Compose](images/docker-compose-vscode.png){: .mt-3}
7. Run the following command in an terminal from the OWS src directory.

```bash
sudo docker-compose -f docker-compose.yml -f docker-compose.override.linux.yml -f docker-compose-additional.yml up -d
```

For a fresh build use the following command

```bash
sudo docker-compose -f docker-compose.yml -f docker-compose.override.linux.yml -f docker-compose-additional.yml up -d --build --force-recreate
```
</details>

[Next: Database setup](setup-database){: .btn .btn-outline }
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: default
title: Docker Setup
title: Visual Studio
parent: Getting Started
nav_order: 1
---
Expand Down
1 change: 0 additions & 1 deletion docs/troubleshooting/visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ layout: default
title: Visual Studio
parent: Troubleshooting
nav_order: 1
has_children: true
---

# Visual Studio
Expand Down
16 changes: 16 additions & 0 deletions src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"docker.commands.composeUp": [
{
"label": "Linux",
"template": "${composeCommand} ${configurationFile} -f docker-compose.override.linux.yml -f docker-compose-additional.yml up ${detached} ${build}"
},
{
"label": "macOS",
"template": "${composeCommand} ${configurationFile} -f docker-compose.override.osx.yml -f docker-compose-additional.yml up ${detached} ${build}"
},
{
"label": "Windows",
"template": "${composeCommand} ${configurationFile} -f docker-compose.override.windows.yml -f docker-compose-additional.yml up ${detached} ${build}"
},
],
}
Loading