GithubHelp home page GithubHelp logo

agencetca / docker-magento2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sensson/docker-magento2

0.0 1.0 0.0 41 KB

A base Magento 2 image that can be used to scale in production

License: Apache License 2.0

Dockerfile 21.02% Shell 45.29% Makefile 4.92% PHP 28.78%

docker-magento2's Introduction

docker-magento2

Docker Automated Build Docker Build Status

A base Magento 2 image that can be used to scale in production. This can be used in combination with MySQL and Redis. It is opinionated and includes support for Composer, ionCube, Redis, OPcache, and the required PHP modules for a basic Magento installation.

It does not include Magento.

Usage

An example Dockerfile

FROM sensson/magento2
COPY src/ /var/www/html/

More details can be found in Magento2 and Docker.

Persistent storage

The container assumes you do not store data in a folder along with the application. Don't use Docker volumes for scale. Use CephFS, GlusterFS or integrate with S3 or S3-compatible services such as Fuga.io.

Configuration

Environment variables

Environment variable Description Default
MYSQL_HOSTNAME MySQL hostname mysql
MYSQL_USERNAME MySQL username root
MYSQL_PASSWORD MySQL password secure
MYSQL_DATABASE MySQL database magento
CRYPTO_KEY Magento Encryption key Emtpy
URI Uri (e.g. http://localhost) http://localhost
RUNTYPE Set to development to enable Empty
ADMIN_USERNAME Administrator username admin
ADMIN_PASSWORD Administrator password adm1nistrator
ADMIN_FIRSTNAME Administrator first name admin
ADMIN_LASTNAME Administrator last name admin
ADMIN_EMAIL Administrator email address [email protected]
BACKEND_FRONTNAME The URI of the admin panel admin
CURRENCY Magento's default currency EUR
LANGUAGE Magento's default language en_US
CONTENT_LANGUAGES The languages used in Magento en_US
TIMEZONE Magento's timezone Europe/Amsterdam
CRON Run as a cron container false
UNATTENDED Run unattended upgrades false

Include the port mapping in URI if you run your shop on a local development environment, e.g. http://localhost:3000/.

Hooks

Hooks allow you to run certain actions at certain points in the startup procedure without having to rewrite entrypoint.sh. You can use hooks to import data, preconfigure settings or run other scripts that need to run each startup sequence.

Hook point Location Description
Pre install /hooks/pre_install.sh Runs before an installation or update.
Pre compile /hooks/pre_compile.sh Runs before code compilation starts.
Post install /hooks/post_install.sh Runs after Magento has been installed.

You need to COPY any hooks to this location yourself.

Development mode

Setting RUNTYPE to development will turn on public error reports. Anything else will leave it off. It will also set display_errors to on in PHP. This is set to off by default.

A basic docker-compose.yml has been provided to help during the development of this image.

docker-magento2's People

Contributors

ju5t avatar

Watchers

James Cloos 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.