logo

Source Code Installation Guide

1. Pull the Code from GitHub

Check the Latest Version

You can switch to the version you want to install by running git checkout v0.1.0 (v0.1.0 is the version number).

Open the terminal and execute the following commands:

bash
cd /var/www # or choose the location where you want to install the web application
git clone https://github.com/innocommerce/innoshop.git
cd innoshop

2. Install Third-Party Dependencies

Open the terminal, navigate to the project directory, and then run the following command to install the required third-party packages:

bash
composer install

3. Compile Front-End Resources

Execute the following command to compile the front-end CSS and JavaScript files:

bash
npm install && npm run prod

4. Set Up the Upload Resources Directory

Run the following command to create and set up the directory for uploaded resources:

bash
php artisan storage:link

5. Set the Website Root Directory

Point your website's root directory to the current project's public folder and configure the pseudo-static pages.

Web Installation Option

After completing the above steps, you have the option to open our installation wizard page through your browser, which will guide you through the remaining installation process. Of course, if you prefer to install manually using the command line, please continue reading the guide below.

6. Create the Configuration File

Copy the .env.example file to create a new .env configuration file:

bash
cp .env.example .env

7. Configure the Database

Depending on your database type, open the .env file and fill in the database configuration information. If you are using SQLite:

SQLite

Your .env file should not contain the DB_HOST key. You also need to create the database/database.sqlite file and set the appropriate permissions.

bash
touch ./database/database.sqlite
chmod 666 ./database/database.sqlite

If you are using MySQL, you will need to modify the database configuration starting with DB_ according to the actual database information.

8. Set the Application Key

Before generating the APP_KEY, make sure you have the correct read and write permissions for the .env file. Then, run the following command:

shell
php artisan key:generate

9. Database Migration and Data Seeding

Finally, execute the following commands to create the database structure and import the basic data:

bash
php artisan migrate && php artisan db:seed

After completing the above steps, your InnoShop should be successfully installed. You can now access it via a browser and start exploring.