GithubHelp home page GithubHelp logo

docker-opencart's Introduction

OpenCart Docker development setup

Intro

All the docker-related files are in the docker folder. This package contains PHP 8.0 with Apache2, MySQL, phpMyAdmin, Mailcatcher services.

Setup

Create an .env file, and define your variables. See .env.example. In docker-compose.yml and in docker/php-apache/Dockerfile change the versions for PHP and MySQL if you need to.

In docker/php-apache/sites/default.apache.conf set your ServerName to your custom domain of choice (the default is opencart.test). Make sure to include this line in your hosts file: 127.0.0.1 opencart.test with your domain.

cd to docker folder and run to build the containers:

(set -a; source .env; docker-compose up --build)

OpenCart installation

Download the zip file from the website. Extract it into the root folder of your project. Start the containers if they are not running.

Visit opencart.test/upload (or your custom domain) in your browser and go through the installation steps. The db credentials should match with the values in your .env file. DB host should be mysql instead of localhost.

You can choose either PDO or mysqli as the db driver (both are installed).

You can of course rename the uploads folder, and setup the software differently.

Logs

Apache2 server logs are in the docker/logs folder

Mailcatcher

Set up on admin page at System -> Settings -> Edit store -> Mail tab:

Mail Engine: SMTP Hostname: mailcatcher Port: 1025

Username and Password should be empty.

In /var/www/html/your-folder/system/library/mail/smtp.php -> comment out these conditions temporarily:

if (empty($this->option['smtp_username'])) {
	throw new \Exception('Error: SMTP username required!');
}

if (empty($this->option['smtp_password'])) {
	throw new \Exception('Error: SMTP password required!');
}

Docker

Start containers:

(docker-compose up)

Destroy the running containers:

(docker-compose down)

docker-opencart's People

Contributors

salsaboy990 avatar

Watchers

Ernie avatar  avatar

Forkers

ip-cam

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.