Skip to content

Latest commit

 

History

History
123 lines (88 loc) · 4.64 KB

deploy-from-precompiled-binaries-linux.md

File metadata and controls

123 lines (88 loc) · 4.64 KB

Deploy on Linux

Use this guide to deploy and configure precompiled Virto Commerce Platform V3.

Prerequisites

Supported Databases

Virto Commerce built with DB agnostic architecture and supports the following databases:

  • Microsoft SQL Server 2019 or above
  • MySql Server 5.7 or above
  • PostgreSQL 12 or above

You have two options for installing the platform

  • Manual downloading the precomplied binaries
  • Using Virto Commerce CLI (vc-buld)

Downloading the precomplied binaries

  • Navigate to the Releases section of Virto Commerce Platform in GitHub.

  • You will find VirtoCommerce.Platform.3.x.x.zip file. In this file the site has already been built and can be run without additional compilation. The source code is not included. Run command to download binaries:

wget "https://github.com/VirtoCommerce/vc-platform/releases/download/3.x.x/VirtoCommerce.Platform.3.x.x.zip"
  • Unpack this zip to a local directory /vc-platform-3. After that you will have the directory with Platform precompiled files.
unzip VirtoCommerce.Platform.3.x.x.zip -d vc-platform-3

Using Virto Commerce CLI (vc-buld).

  • Install vc-build
dotnet tool install -g VirtoCommerce.GlobalTool
  • Install platform and modules
vc-build install

Also you can specify the platform version:

vc-build install -version 3.293.0

Check out vc-build for packages management for more info.

Setup

Configure application strings

  • Open the appsettings.json file in a text editor.
  • In the ConnectionStrings section change VirtoCommerce node (provided user should have permission to create new database):
    "ConnectionStrings": {
        "VirtoCommerce" : "Data Source={SQL Server URL};Initial Catalog={Database name};Persist Security Info=True;User ID={User name};Password={User password};MultipleActiveResultSets=True;Connect Timeout=30"
    },
  • In the Assets section set public url for assets Assets:FileSystem:PublicUrl with url of your application, this step is needed in order to display images
"Assets": {
        "Provider": "FileSystem",
        "FileSystem": {
            "RootPath": "~/assets",
            "PublicUrl": "https://localhost:5001/assets/" <-- Set your platform application url with port localhost:5001
        },
    },
  • In the Content section set public url for content Content:FileSystem:PublicUrl with url of your application, this step is needed in order for configure CMS content storage
"Content*": {
        "Provider": "FileSystem",
        "FileSystem": {
            "RootPath": "~/cms-content",
            "PublicUrl": "https://localhost:5001/cms-content/" <-- Set your platform application url with port localhost:5001
        },
    },

Running the Platform by CLI "dotnet"

  • Install and trust HTTPS certificate

Run steps described in this article to trust the .NET Core SDK HTTPS development certificate on Linux.

Read more about enforcing HTTPS in ASP.NET Core

  • Run the Platform by following command:
export ASPNETCORE_URLS="http://+:5000;https://+:5001"
cd vc-platform-3
dotnet VirtoCommerce.Platform.Web.dll

The output in the console will say something like:

Now listening on: http://[::]:5000
Now listening on: https://[::]:5001

First run and sign in

  • Open https://localhost:5001 url in your browser. "Your connection is not private" might appear. Click "Advanced" and "Proceed to ...". Read more on removing this error and using a self-signed certificate: Trust the ASP.NET Core HTTPS development certificate
  • The application will create and initialize database on the first request. After that you should see the sign in page. Use the following credentials:
    • Login: admin
    • Password: store