Giter Site home page Giter Site logo

mcastillof / nginx-prestashop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kulturbande/nginx-prestashop

0.0 0.0 0.0 41 KB

A dockerized version of PrestaShop using Nginx, PHP FastCGI Process Manager and MySQL linked together by docker-compose.

License: Apache License 2.0

Dockerfile 54.78% Shell 45.22%

nginx-prestashop's Introduction

PrestaShop using Nginx and PHP:FPM with Docker Compose

A dockerized version of PrestaShop using the latest stable versions of Nginx, PHP FastCGI Process Manager and MySQL linked together by docker-compose.

Installation

Prerequisite:

  • Docker and Docker-compose are installed on your system.
  • You have cloned this repository.

Here are the steps to get started:

  1. Change into directory:
cd nginx-prestashop

Your directory should now look like this:

.
├── docker-compose.yml
├── docker-images
│   ├── mysql
│   │   ├── Dockerfile
│   │   └── my.conf
│   ├── nginx
│   │   ├── Dockerfile
│   │   └── site.conf
│   └── php-fpm
│       └── Dockerfile
├── documentation
│   └── containersNetwork.png
├── install-Nginx-PrestaShop.sh
├── install-Nginx-PrestaShop1.7.sh
├── LICENSE
└── README.md
  1. Next download the PrestaShop source and unzip it. The stable version currently is 1.6.1.13.
# Download the PrestaShop source
wget https://www.prestashop.com/download/old/prestashop_1.6.1.13.zip

# Unzip the PrestaShop archive
unzip prestashop_1.6.1.13.zip

# Remove zip and install file
rm prestashop_1.6.1.13.zip Install_PrestaShop.html
  1. Set the correct user and group ownership for the PrestaShop directory (run as root).
sudo chown -R www-data:www-data prestashop/

Your directory should now look like this:

   .
   ├── docker-compose.yml
   ├── docker-images
   │   ├── mysql
   │   ├── nginx
   │   └── php-fpm
   ├── documentation
   │   └── ...
   ├── prestashop
   │   └── ...
   ├── install-Nginx-PrestaShop.sh
   ├── install-Nginx-PrestaShop1.7.sh
   ├── LICENSE
   └── README.md

All the steps are defined in this script install-Nginx-PrestaShop.sh.

Starting your PrestaShop

  1. Set strong passwords in the .env file.
   #To do: change for production environment
   MYSQL_ROOT_PASSWORD=mysql-root-pwd
   MYSQL_USER=mysql-user
   MYSQL_PASSWORD=mysql-pwd
   MYSQL_DATABASE=prestashop

  1. Start your PrestaShop using docker-compose up.

  2. Follow the installation steps of PrestaShop.

    The MySQL's server name is sql-server.

    Do not forget to delete the install folder in the PrestaShop directory in the end. As the directory now belongs to 'www-data' switch to that user or run as root:

   sudo rm -r prestashop/install

Stopping your PrestaShop

To stop your PrestaShop simply type: docker-compose stop.

Containers

Overview

The dockerized version of your PrestaShop consists of the following containers:

  1. Nginx web server image
  2. PHP php:fpm image
  3. MySQL MySQL image
  4. phpMyAdmin PHP My Admin image (on port 9010)
  5. Portainer Portainer image (on port 9000). Added for illustrative purposes only, not needed for production.

The screen shot below visualizes the setup:

NGINX PrestaShop: Containers Network

Using different SSL certificates

By default dummy certificates are used (see docker-images/nginx/Dockerfile). If you want to use a different certificate you can override the key and cert with your own certificates. If proper certificates are used HTTP2 is supported.

To Do

  • Add an example of how to link to an existing MySQL database instance.

Thanks

Thanks to Andreas Koch for his excellent examples on dockerizing Magento. Have a look at a blog-post of his: Dockerizing Magento.

Licensing

nginx-prestashop is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

nginx-prestashop's People

Contributors

schlpbch 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.