+
Skip to content

Run the Virto Commerce backend, frontend, database server, Redis Elasticsearch, and Kibana on your local machine with a simple PowerShell script.

Notifications You must be signed in to change notification settings

VirtoCommerce/start-local

Repository files navigation

🚀 Run Virto Commerce Locally with Docker

Set up a complete Virto Commerce environment on your local machine with a single PowerShell script. The solution includes:

  • Virto Commerce Backend
  • Virto Commerce Frontend
  • PostgreSQL database
  • Redis
  • Elasticsearch
  • Kibana

Important

This setup is for local development and testing only. Not for production use! !TODO! For production deployments, consult the official documentation for Elasticsearch and Kibana.

💻 System Requirements

  • ~5 GB available disk space
  • .NET SDK (Required for vc-build installation)
  • vc-build tool (Install with: dotnet tool install VirtoCommerce.GlobalTool -g)
  • Docker (On Linux/MacOS, configure Docker to run without sudo)
  • Compatible with Windows (Requires PowerShell v.7)
  • For Linux/MacOS: Requires PowerShell v.7 (Linux install, macOS install)

🏃‍♀️ Getting Started

Initial Setup

Run this command to create a local VirtoLocal directory with all required files:

$installSCript = Invoke-WebRequest -Uri "https://raw.githubusercontent.com/VirtoCommerce/start-local/dev/VirtoLocal_create_local_files.ps1" -UseBasicParsing; Set-Content -Path ".\VirtoLocal_create_local_files.ps1" -Value $installSCript.Content; .\VirtoLocal_create_local_files.ps1

The following files and folders will be created:

  • docker-compose.yml: Docker Compose configuration for VirtoCommerce solution
  • backend folder: Dockerfile and script(s) for the backend
  • frontend folder: Dockerfile and config file(s) for the frontend
  • scripts folder: Scripts in the build solution process
  • build-VC-solution.ps1: Script to build docker images for backend and frontend
  • start-VC-solution.ps1: Script to start a solution using built by build-VC-solution.ps1 script
  • stop-VC-solution.ps1: Script stops VC solution but does NOT remove the volumes associated with the docker containers
  • remove-VC-solution.ps1: Script removes docker volumes associated with the containers, removes backend and frontend docker images from local docker storage

By default build-VC-solution script is executed automatically after the files are created and start-VC-solution script is executed automatically after the build is complete. However, the execution can be skipped.

You have two options for installing Virto Commerce: using the latest stable release or the edge release. Learn more about our release strategy by following this link.

Endpoints

After running the script:

Initial Configuration

  1. Open the Virto Commerce Backend and sign in using the default credentials:
    • Username: admin
    • Password: store
  2. You will be prompted to change the password upon first login.
  3. Review or install the sample data set to populate the system with example products and catalogs.
  4. Navigate to the Search Index section and ensure that all indexes are built successfully.
  5. Open the Virto Commerce Frontend to view and explore the sample data.

Please take a look at Virto Commerce Documentation for additional configuration and customisation guidance.

Manual Installation

The manual installation steps are as follows:

  1. First run build-VC-solution.ps1 with these version options:
  • vcSolutionVersion parameter:
    • latest-stable: Installs the latest stable backend bundle with compatible frontend
    • edge: Installs the newest backend and frontend releases
  1. Then run start-VC-solution.ps1 to launch:
  • Virtocommerce backend/frontend
  • PostgreSQL
  • Redis
  • Elasticsearch
  • Kibana

Use stop-VC-solution.ps1 to pause containers while preserving your data.

Version Configuration

Customize versions and ports in the .env file. Default settings:

PGSQL_VERSION=16.9
STACK_VERSION=8.18.0
PLATFORM_PORT=8090
ES_PORT=9200
KIBANA_PORT=5601
DB_PASSWORD=$(New-RandomPassword)
REDIS_PASSWORD=$(New-RandomPassword)
ELASTIC_PASSWORD=$(New-RandomPassword)
KIBANA_PASSWORD=$(New-RandomPassword)
PGSQL_PORT=5432
REDIS_PORT=6379
FRONTEND_PORT=80

Important

After changing the .env file, restart the services using stop-VC-solution.ps1 and start-VC-solution.ps1

🗑️ Uninstallation

To fully uninstall and erase all data:

  1. Run /VirtoLocal/remove-VC-solution.ps1
  • Stops containers
  • Deletes persistent volumes
  • Removes vc-platform:local-latest and vc-frontend:local-latest images

Warning

This permanently destroys all data.

Warning

PostgresSQL, Redis, Elasticsearch, and Kibana base images remain installed.

References

License

Copyright (c) Virto Solutions LTD. All rights reserved.

Licensed under the Virto Commerce Open Software License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://virtocommerce.com/opensourcelicense

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

About

Run the Virto Commerce backend, frontend, database server, Redis Elasticsearch, and Kibana on your local machine with a simple PowerShell script.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载