Skip to content

Getting Started

Krzysztof Pajak edited this page Jul 7, 2021 · 2 revisions

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

GrandNode 2.0 requires .NET Core 5.0, MongoDB 4.0+, and OS-specific dependency tools.

Installation

GrandNode 2.0 can be installed in a few different ways. Note: The develop branch is the development version of GrandNode 2.0 and it may be unstable. To use the latest stable version, download it from the Releases page or switch to a release branch.

Docker

docker run -d -p 127.0.0.1:27017:27017 --name mongodb mongo docker run -d -p 80:80 --name grandnode2 --link mongodb:mongo grandnode/grandnode2 If you want to download the latest stable version of GrandNode 2.0 please use the following command, where x.xx is a number of GrandNode 2.0 release:

docker pull grandnode/grandnode2:x.xx Open locally with VS2019+ Run the project in the Visual Studio 2019+, extract the source code package downloaded from Releases tab to a folder. Enter the extracted folder and double-click the GrandNode.sln solution file. Select the Plugins project, rebuild it, then select the GrandNode.Web project.

Host on Linux server

Before you start - please install, configure the nginx server, .NET Core 5.0+ and MongoDB 4.0+

mkdir ~/source cd ~/source git clone - b x.xx https://github.com/grandnode/grandnode2.git cd ~/source/grandnode dotnet restore GrandNode.sln Now it's time to rebuild all of our plugins and publish application (command is pretty long because we've combined all commands in a single line, to ease up your work):

sudo dotnet build src/Plugins/Authentication.Facebook && sudo dotnet build src/Plugins/Authentication.Google && sudo dotnet build src/Plugins/DiscountRules.Standard && sudo dotnet build src/Plugins/ExchangeRate.McExchange && sudo dotnet build src/Plugins/Payments.BrainTree && sudo dotnet build src/Plugins/Payments.CashOnDelivery && sudo dotnet build stc/Plugins/Payments.PayPalStandard && sudo dotnet build src/Plugins/Shipping.ByWeight && sudo dotnet build src/Plugins/Shipping.FixedRateShipping && sudo dotnet build src/Plugins/Shipping.ShippingPoint && sudo dotnet build src/Plugins/Tax.CountryStateZip && sudo dotnet build stc/Plugins/Tax.FixedRate && sudo dotnet build src/Plugins/Widgets.FacebookPixel && sudo dotnet build stc/Plugins/Widgets.GoogleAnalytics && sudo dotnet build src/Plugins/Widgets.Slider && sudo dotnet publish src/Web/Grand.Web -c Release -o /var/webapps/grandnode Optional: Create the service file, to automatically restart your application.

sudo vi /etc/systemd/system/grandnode.service Paste the following content, and save changes:

[Unit] Description=GrandNode2

[Service] WorkingDirectory=/var/webapps/grandnode ExecStart=/usr/bin/dotnet /var/webapps/grandnode/Grand.Web.dll Restart=always RestartSec=10 SyslogIdentifier=dotnet-grandnode User=www-data Environment=ASPNETCORE_ENVIRONMENT=Production

[Install] WantedBy=multi-user.target Enable the service and restart the GrandNode

sudo systemctl enable grandnode.service sudo systemctl start grandnode.service

Feel free to visit our detailed guide about Grandnode 2 installation.

Install GrandNode 2.0 with one click on DigitalOcean

Clone this wiki locally