Project Description
Install a lightweight Prestashop container with OpenLiteSpeed Server and SSL Certificates. Current Docker Container based on ols-docker-env repository.
Prerequisites
You must have already installed docker and docker-compose
or create a droplet with preinstalled docker as showed in the video tutorial below
Configuration
This is most important step before installing the container. Please read carefully description for each variable and change it as you need
Edit the .env file to update the website domain, define MySQL credentials and configure Prestashop. See all available environment variables below.
Usage
- Upload "litespeed" directory to your server
- Configire your project in the .env file
- Set right files permissions of the project. Run the following script:
./setpermissions.sh
- Run the installer script:
./install.sh
Video Tutorial
Installation Process
Step by Step commands
In case you want to run some specific step. Run all commnads from the root of "litespeed" directory
- Start the container:
docker-compose up -d
- Change LiteSpeed Admin password:
bash bin/webadmin.sh LS_ADMIN_PASSWORD
- Add a new domain:
bash bin/domain.sh -add DOMAIN
- Add a new databse:
bash bin/database.sh --domain DOMAIN --database DATABASE_NAME --user MYSQL_USER --password MYSQL_PASSWORD
- copy all necessary files like demo data, theme, modules:
bash bin/apppreinstall.sh DOMAIN PK_APP_NAME INSTANCE
- Install Prestashop and the thme:
bash bin/appinstall.sh --app prestashop --domain DOMAIN
- Install SSL Certificates:
#bash bin/acme.sh --install --no-email #bash bin/acme.sh --domain DOMAIN
Links
These links depends on variables defined in the .env file
- https://yourdomain.com/admin670qtkeja - Prestashop Back Office
- https://yourdomain.com:8080 - PhpMyAdmin
- https://server_ip:7080 - LiteSpeed Admin Panel
Project Directories
Directory/File | Description |
acme | contains all applied certificates from Lets Encrypt |
bin | contains multiple CLI scripts to allow you add or delete virtual hosts, install prestashop, etc |
data | stores the MySQL database, Demo Data and Configs |
data/db | stores the MySQL database |
data/files/configs/mysql | contains optimized for Prestashop MySQL configuration file |
data/files/configs/mysql | contains optimized for Prestashop MySQL configuration file |
data/files/demo | contains demo fixtutes and demo SQL dump |
data/files/theme | contains prestashop theme to install |
docs | project documentation |
logs | contains all of the web server logs and virtual host access logs |
lsws | contains all web server configuration files |
sites | contains the document roots (the Prestashop application will install here) |
.env | a simple configuration text file that is used to define variables to use in the project environment |
docker-compose.yml | specifies what images are required, what ports they need to expose, and so on. |
Dockerfile | contains command line to assemble an specific image |
install.sh | the file what runs project installation |
setpermissions.sh | the file what set correct files permissions of the project |
Environment Variables
Variable | Description |
INSTANCE | The name of installed demo. Available options: alysum, classic, lingerie, electronics, oldstyle, dailydeal, fullpage |
DOMAIN | your domain name. MUST be registered and available |
LS_ADMIN_PASSWORD | LiteSpeed Server Admin Panel Password https://SERVER_IP:7080, login "admin" |
MYSQL_SERVER | Database Server. Defined in the docker-compose file |
MYSQL_ROOT_PASSWORD | Database Root Password |
MYSQL_USER | Database User Name. Used by applications |
MYSQL_PASSWORD | Database Password (used by Prestashop/PhpMyAdmin) |
PS_VERSION | Prestashop version to install. See all available releases here https://www.prestashop.com/en/previous-versions |
PS_PREFIX | Prestashop Database tables prefix. More details https://devdocs.prestashop.com/1.7/development/database/ |
PS_LANG | Prestashop default language |
PS_FIRSTNAME | Prestashop admin account First Name |
PS_LASTNAME | Prestashop admin account Second Name |
PS_ADMIN_MAIL | Prestashop Back Office login |
PS_ADMIN_PASSWD | Prestashop Back office password |
PS_ADMIN_PATH | Prestashop Back office path (URL) |
PK_APP_NAME | The name of the project. Do not change! |
PK_DEMO_INSTALL | Install or not Demo Data, use "yes" or "no" values |
PK_SSL_INSTALL | Install or not SSL Certificate, use "yes" or "no" values |