GithubHelp home page GithubHelp logo

isabella232 / docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prestashop/docker

0.0 0.0 0.0 868 KB

๐Ÿณ

Home Page: https://hub.docker.com/r/prestashop/prestashop/

License: MIT License

Shell 40.51% PHP 21.43% Dockerfile 38.06%

docker's Introduction

PrestaShop on Docker

Build Status

Supported tags

Image by PrestaShop version

  • 1.7, latest
  • 1.6
  • 1.5
  • 1.4
  • nightly (Latest but unstable release from git)
  • beta

Other PHP versions

By default, our images are running with PHP 5.6. But each major version can be launched with another PHP version if you want to.

  • Apache
    • PHP 5.6: 1.5-5.6-apache, 1.6-5.6-apache
    • PHP 7.0: 1.5-7.0-apache, 1.6-7.0-apache
    • PHP 7.1: 1.5-7.1-apache, 1.6-7.1-apache, 1.7-7.1-apache, nightly-7.1-apache
    • PHP 7.2: 1.5-7.2-apache, 1.6-7.2-apache, 1.7-7.2-apache, nightly-7.2-apache
    • PHP 7.3: 1.7-7.3-apache, nightly-7.3-apache, nightly
  • FPM
    • PHP 5.6: 1.5-5.6-fpm, 1.6-5.6-fpm
    • PHP 7.0: 1.5-7.0-fpm, 1.6-7.0-fpm
    • PHP 7.1: 1.5-7.1-fpm, 1.6-7.1-fpm, 1.7-7.1-fpm, nightly-7.1-fpm
    • PHP 7.2: 1.5-7.2-fpm, 1.6-7.2-fpm, 1.7-7.2-fpm, nightly-7.2-fpm
    • PHP 7.3: 1.7-7.3-fpm, nightly-7.3-fpm

You can use tags for this. For example:

$ docker run -ti --name my-docker-name -e PS_DEV_MODE=false -e PS_INSTALL_AUTO=0 -p 8080:80 -d prestashop/prestashop:1.7-7.0

What is PrestaShop

PrestaShop is a free and open-source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. See all the available features.

www.prestashop.com

PrestaShop's back office dashboard

How to run this image

This image is running with the latest Apache version in the official PHP repository. For the database, you can use and link any SQL server related to MySQL. We advise MySQL 5.6 for PrestaShop 1.6 and MySQL 5.7 for Prestashop 1.7 . MySQL 8 can be used with additional configuration.

Currently if you do not have any MySQL server, the most simple way to run this container is:

# create a network for containers to communicate
$ docker network create prestashop-net
# launch mysql 5.7 container
$ docker run -ti --name some-mysql --network prestashop-net -e MYSQL_ROOT_PASSWORD=admin -p 3307:3306 -d mysql:5.7
# launch prestashop container
$ docker run -ti --name some-prestashop --network prestashop-net -e DB_SERVER=some-mysql -p 8080:80 -d prestashop/prestashop

A new shop will be built, ready to be installed.

You can then use the shop by reaching http://localhost:8080.

The MySQL server can be reached:

  • from the host using port 3307 (example: $ mysql -uroot -padmin -h localhost --port 3307)
  • from a container in the network using the URL some-mysql.

For example, when you reach the "database configuration" install step, the installer will ask for the "server database address": input some-mysql.


However, if you want to customize the container execution, here are many available options:

  • PS_DEV_MODE: The constant _PS_MODE_DEV_ will be set at true (default value: 0)
  • PS_HOST_MODE: The constant _PS_HOST_MODE_ will be set at true. Useful to simulate a PrestaShop Cloud environment. (default value: 0)
  • PS_DEMO_MODE: The constant _PS_DEMO_MODE_ will be set at true. Use it to create a demonstration shop. (default value: 0)
  • DB_SERVER: If set, the external MySQL database will be used instead of the volatile internal one (default value: localhost)
  • DB_USER: Override default MySQL user (default value: root)
  • DB_PASSWD: Override default MySQL password (default value: admin)
  • DB_PREFIX: Override default tables prefix (default value: ps_)
  • DB_NAME: Override default database name (default value: prestashop)
  • PS_INSTALL_AUTO=1: The installation will be executed. Useful to initialize your image faster. In some configurations, you may need to set PS_DOMAIN or PS_HANDLE_DYNAMIC_DOMAIN as well. (Please note that PrestaShop can be installed automatically from PS 1.5)
  • PS_ERASE_DB: Drop the mysql database. All previous mysql data will be lost (default value: 0)
  • PS_INSTALL_DB: Create the mysql database. (default value: 0)
  • PS_DOMAIN: When installing automatically your shop, you can tell the shop how it will be reached. For advanced users only (no default value)
  • PS_LANGUAGE: Change the default language installed with PrestaShop (default value: en)
  • PS_COUNTRY: Change the default country installed with PrestaShop (default value: GB)
  • PS_ALL_LANGUAGES: Install all the existing languages for the current version. (default value: 0)
  • PS_FOLDER_ADMIN: Change the name of the admin folder (default value: admin. But will be automatically changed later)
  • PS_FOLDER_INSTALL: Change the name of the install folder (default value: install. But must be changed anyway later)
  • PS_ENABLE_SSL: Enable SSL at PrestaShop installation. (default value: 0)

By default, we use the employee existing on the PrestaShop demo. But you can change it with the following parameters:

  • ADMIN_MAIL: Override default admin email (default value: [email protected])
  • ADMIN_PASSWD: Override default admin password (default value: prestashop_demo)

If your IP / port (or domain) change between two executions of your container, you will need to modify this option:

  • PS_HANDLE_DYNAMIC_DOMAIN: Add specific configuration to handle dynamic domain (default value: 0)

License

View license information for the software contained in this image.

Documentation

The documentation (in English by default) is available at the following addresses:

Troubleshooting

Prestashop cannot be reached from the host browser

When using Docker for Mac, Prestashop cannot be reached from the host browser (gets redirected to "dockeripaddress:8080")

Docker for Mac has an issue with bridging networking and consequently cannot reach the container on its internal IP address. After installation, the browser on the host machine will be redirected from http://localhost:8080 to http://<internal_prestashop_container_ip>:8080 which fails.

You need to set the PS_DOMAIN variable to localhost:8080 for it to work correctly when browsing from the host computer. The command looks something like this:

$ docker run -ti --name some-prestashop --network prestashop-net -e DB_SERVER=some-mysql -e PS_DOMAIN=localhost:8080 -p 8080:80 -d prestashop/prestashop

Cannot connect to mysql from host - authentication plugin cannot be loaded

ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: ...

If your mysql image uses MySQL 8, the authentication plugin changed from mysql_native_password to caching_sha2_password. You can bypass this by forcing the old authentication plugin:

$ docker run -ti -p 3307:3306 --network prestashop-net --name some-mysql -e MYSQL_ROOT_PASSWORD=admin -d mysql --default-authentication-plugin=mysql_native_password

Cannot connect to mysql from host - cannot use socket

ERROR 1045 (28000): Access denied for user '...'@'...' (using password: YES)

For some usecases, you might need to force using TCP instead of sockets:

$ mysql -u root -padmin -h localhost --port 3307 --protocol=tcp

During the installation, prestashop cannot connect to mysql - bad charset

Server sent charset (255) unknown to the client. Please, report to the developers

MySQL 8 changed the default charset to utfmb4. But some clients do not know this charset. This requires to modify the mysql configuration file.

If you are using a mysql container, you need to :

  • modify mysql configuration file /etc/mysql/my/cnf and add:
[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
  • restart mysql container

docker's People

Contributors

atomiix avatar bigbrozer avatar c100k avatar djodjo3 avatar dracito avatar jolelievre avatar jsshandle avatar matks avatar matthieu-rolland avatar matthieumota avatar maximebiloe avatar mwienk avatar osapozhnikov avatar pierrerambaud avatar pimuzzo avatar poulainmaxime avatar progi1984 avatar ptt-homme avatar pululuk avatar quetzacoalt91 avatar sergioregueira avatar tibs245 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.