Skip to content

Billmate/docker-magento2

 
 

Repository files navigation

Docker image for Magento 2

This is based upon the repo Docker Magento 2.

Installation

For more information about the setup

The easiest way to start Magento 2 with MySQL is using Docker Compose. Just clone this repo and run following command in the root directory. The default docker-compose.yml uses MySQL and phpMyAdmin.

$ docker-compose up -d

For admin username and password, please refer to the file env. You can also change the file env to update those configurations. Below are the default configurations.

MYSQL_HOST=db
MYSQL_ROOT_PASSWORD=myrootpassword
MYSQL_USER=magento
MYSQL_PASSWORD=magento
MYSQL_DATABASE=magento

MAGENTO_LANGUAGE=en_GB
MAGENTO_TIMEZONE=Pacific/Auckland
MAGENTO_DEFAULT_CURRENCY=NZD
MAGENTO_URL=http://local.magento
MAGENTO_BACKEND_FRONTNAME=admin
MAGENTO_USE_SECURE=0
MAGENTO_BASE_URL_SECURE=0
MAGENTO_USE_SECURE_ADMIN=0

MAGENTO_ADMIN_FIRSTNAME=Admin
MAGENTO_ADMIN_LASTNAME=MyStore
[email protected]
MAGENTO_ADMIN_USERNAME=admin
MAGENTO_ADMIN_PASSWORD=magentorocks1

After starting the container, you'll see the setup page of Magento 2. You can use the script install-magento to quickly install Magento 2. The installation script uses the variables in the env file.

For more information about how to install on the Docker setup instead

Install Magento

$ docker exec -it <container_name> install-magento

or just use the bin commands

install-magento

Sample data

$ docker exec -it <container_name> install-sampledata

or just use the bin commands

install-sampledata

Create a DNS host entry for the site:

echo "127.0.0.1 local.magento" | sudo tee -a /etc/hosts

URL(s)

To access the frontend:

local.magento

To access the admin part:

local.magento/admin

User: admin

Password: magentorocks1

Working with Billmate Checkout Magento 2 Module

First of all clone the repo down to the path:

src/app/code

From the Docker will sync all the files.

Next step is then to follow the installation instructions of the Module.

You are now ready to start testing/development!

Magento commands cli

you can run all mangeto CLi from this bin

bin/magento
bin/magento cache:clean 
bin/magento config:show 
bin/magento sampledata:remove

Docker settings

As Magento 2 requires quite a lot of memory it may help to up the memory settings for Docker.

Docker settings

Packages

No packages published

Languages

  • Less 93.2%
  • HTML 3.0%
  • JavaScript 2.5%
  • PHP 0.7%
  • Dockerfile 0.3%
  • Shell 0.2%
  • Handlebars 0.1%