Installing and Running Vactory Next in local machines

How to install and configure Vactory Next projects in your local machine and Docker


Installing and Running Vactory Next in local machines

Requirements:

  • Node v18.18.2 or above
  • Yarn v1.22.19
  • Docker Desktop

Installation:

  • Switch to the feature/v3 branch.
  • Install project packages by running: yarn install

Configuration:

  1. Configure the .env file with the necessary variables (refer to apps/starter/.env.example for guidance).
  2. Activate cache ports in the docker-compose.yml file by uncommenting them.
  3. Run Redis cache with Docker by executing: docker compose up cache -d
  4. Build custom packages (console and core) the first time you clone the project by running: yarn workspace @vactory/console build && yarn workspace @vactorynext/core build

Running the Development Server:

  • Front Development mode:
    1. Start the development server by running: yarn workspace starter dev
    2. Access the application at: http://localhost:3000 Access Admin Console at: http://localhost:3000/fr/admin
  • Storybook:
    1. Start the development server by running: yarn workspace starter storybook:dev
    2. The application should automatically open in your browser. If it does not, you can manually access it at: http://localhost:6006
  • Doc Development mode:
    1. Start the development server by running: yarn workspace documentation dev
    2. Access the application at: http://localhost:3000

Notes:

  • If you encounter errors related to undefined data, ensure all necessary variables are configured at http://localhost:3000/fr/admin/features

Running Vactory Next in Docker

  1. Configure the .env file: Ensure all necessary environment variables are set by referring to the example file located at apps/starter/.env.example.
  2. Modify docker-compose.yml: Activate ports for services.starter and services.cache to ensure proper communication.
  3. Build the Docker image: Execute the command docker compose build to create the Docker image necessary for running your application.
  4. Launch the application: Use docker compose up -d to start your application in detached mode. This keeps the containers running in the background.
  5. Access the application: Navigate to http://localhost:3000 in your web browser to view and interact with the application.