Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

3. Development Setup

Nguyễn Xuân Nhân edited this page Oct 3, 2023 · 1 revision

Configure Docker Desktop

Docker Desktop allows you to enable Kubernetes, which can be beneficial for deploying and managing containers. To enable Kubernetes:

  • Open Docker Desktop settings.
  • Navigate to the "Kubernetes" tab.
  • Check the box to enable Kubernetes and apply the settings.

image

Note:

If you intend to run a database within a containerized environment, please be aware that the application utilizes separate containers for PostgreSQL, Redis, and Seq. The PostgreSQL container accommodates four databases for replication purposes, while the Redis container employs three databases to support high availability. It's essential to consider the significant memory requirements associated with these containers.

If you have installed Docker Desktop on a system that supports WSL 2, then WSL 2 will be enabled by default. It automatically uses the required CPU and memory resources while building and running containers. For more details refer : Docker Desktop WSL 2 backend

Setting Up Your Workspace

To set up an NX workspace that includes Next.js, .NET, and Flutter, follow these steps:

  1. Install Node.js: Ensure you have Node.js installed on your system. If not, download and install it from the official Node.js website.

  2. Install Yarn (Optional): Yarn is a package manager that works well with NX. You can install it globally by following the instructions on the Yarn website.

  3. Install the NX CLI: Install the NX CLI globally using npm or Yarn by running the following command in your terminal:

npm install -g nx

# or
yarn global add nx

Explore the application

Use Visual Studio

You have to install VS 2022 and you can install the latest release from https://visualstudio.microsoft.com/vs/.

Make sure you have the latest .NET 7.0 SDK from https://dotnet.microsoft.com/download/dotnet/7.0 or above installed.

Upon running the installer, select the following workloads depending on the apps you intend to test or work with:

Server side (Application Programming Interface and Website applications) - Workloads

  • ASP.NET and Web development
  • Azure development (Optional) - It is optional but recommended in case you want to deploy to Docker hosts in Azure or use any other infrastructure in Azure.

image

To set the startup project in Visual Studio 2022:

image

Use Visual Studio Code

To work with this project, follow these steps:

  1. Install Visual Studio Code (VS Code):

    • If you don't already have VS Code installed, you can download and install the latest release from the official VS Code website.
  2. Install Required Extensions:

  3. Install or Update Node.js, Flutter, and Python:

    • Ensure that you have the latest versions of Node.js, Flutter, and Python installed on your system. You can download and install them from their respective official websites:
  4. Open Your Project in VS Code:

    • Open VS Code and use the "Open Folder" option to open your project directory.
  5. Start Coding:

    • You're now ready to start coding and developing your project using the enhanced capabilities of Visual Studio Code and the installed extensions.

By following these steps and installing the necessary extensions, you'll have a more productive development environment for working with Node.js, Flutter, Python, Docker and Kubernetes within Visual Studio Code.