How do I install Aero?
Required Services
First, we need to install a few required services.
Composer
A dependency manager for PHP (Download Composer).
Node.js
A JavaScript runtime that lets you run tools and apps outside of the browser (Download Node.js).
Laravel Herd
An all-in-one local development environment for Laravel and PHP,
- MacOS: Installation guide for MacOS
- Windows: Installation guide for Windows
If not using Herd Pro you'll need to run MySQL yourself, we suggest using DBngin (Download DBngin).
If needed, you can secure a Herd site by clicking the lock next to its name in the Site Manager (See herd docs).
Docker
An open source container service provider (Download Docker).
Setting up Agora
Agora is our platform for managing Aero projects. It allows organisations to oversee their projects, collaborate with agencies, and publish custom packages and/or themes. These packages and themes can be installed via Composer to extend or customise the functionality of any Aero store.
You must apply to be an agency on Agora to be able to use Aero Commerce.
Applying to be an Aero Commerce Agency
You can begin the application process here: https://agora.aerocommerce.com/register.
Creating your Project Credentials
To create your project credentials, navigate to https://agora.aerocommerce.com/projects and click the New Project button, then simply enter the project's name and optionally its domain.
Elasticsearch
Elasticsearch is the search engine that we'll use for our store. To set it up, we will create a Docker container by running the following command in our terminal:
docker run -d \
-p 9200:9200 \
-m 1GB \
-e "discovery.type=single-node" \
-e "xpack.security.enabled=false" \
elasticsearch:8.17.4
-dEnables detached mode, meaning the container will run in the background without blocking the terminal.-p 9200:9200Maps port9200on your local machine (host) to port9200inside the container.-m 1GBLimits the container's memory usage to 1 GiB (else it will reserve 50% of your Docker memory).-e "discovery.type=single-node"Sets the environment variable to configure Elasticsearch to run insingle-nodemode.-e "xpack.security.enabled=false"Disables X-Pack security, meaning no authentication is required for accessing Elasticsearch.
You can check for the latest version to install instead of 8.17.4 here.
You can ensure Elasticsearch is running by visiting http://localhost:9200.
Creating your First Store
Before we can create our first store we must install the command-line installer tool using Composer, to do this run the following commands in your terminal:
First, install it globally:
composer global require aerocommerce/cli
Then, make sure to place Composer's system-wide vendor bin directory in your $PATH:
export PATH="$PATH:$HOME/.composer/vendor/bin"
Now we have global access to the aero new command in our terminal which we can use like so to create our first store:
aero new my-first-store --laravel=13
-
--laravel=[version]Optionally specifies the laravel version to install.
You will be prompted to enter your Agora project credentials that you created earlier, you can find them here.
Storefront
You can view your storefront by navigating to http://my-first-store.test in your browser, which will be empty as your store has no listings.
Admin
You can view the admin by navigating to http://my-first-store.test/admin in your browser and logging in.
- Username: admin@example.com
- Password: aerocommerce
Upon logging in you will be prompted to change your password & must do so before being able to navigate to other pages of the admin.
Importing Sample Data
First, enter the store’s directory, e.g.:
cd my-first-store
Then run the products import command (choose one of the below):
- Fashion:
herd php artisan aero:import:products:csv https://aero-data.s3.eu-west-2.amazonaws.com/products.csv - Furniture:
herd php artisan aero:import:products:csv https://aero-data.s3.eu-west-2.amazonaws.com/furniture.csv
As well as the blocks import command (choose one of the below, inline with previous choice):
- Fashion:
herd php artisan aero:import:blocks:csv https://aero-data.s3.eu-west-2.amazonaws.com/blocks/fashion.csv - Furniture:
herd php artisan aero:import:blocks:csv https://aero-data.s3.eu-west-2.amazonaws.com/blocks/furniture.csv
Finally, run your search queue:
herd php artisan queue:work --queue=search --timeout=0