Skip to content

Commit

Permalink
Adiciona Magento 2 com módulo da Rede
Browse files Browse the repository at this point in the history
  • Loading branch information
netojoaobatista committed Mar 18, 2019
0 parents commit f04d25b
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions magento2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.magento
.git
42 changes: 42 additions & 0 deletions magento2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM php:7.2-apache
LABEL maintainer="João Batista Neto <[email protected]>"
LABEL version="1.0.0"
LABEL description="Imagem Docker para Magento 2.3 com módulo de pagamento da Rede"

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y git unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libxml2-dev \
libxslt1-dev

RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install pdo \
pdo_mysql \
gd \
bcmath \
intl \
xsl \
soap \
zip

RUN usermod -u 1001 www-data
RUN groupmod -g 1001 www-data

RUN mkdir -p /var/www/.composer
RUN chown www-data.www-data /var/www/.composer

RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php
RUN php -r "unlink('composer-setup.php');"
RUN mv composer.phar /usr/bin/composer && chmod +x /usr/bin/composer
RUN sed -i "13i\ \n\t<Directory \"/var/www/html\">\n\t\tAllowOverride All\n\t</Directory>" /etc/apache2/sites-enabled/000-default.conf
RUN a2enmod rewrite

USER www-data
RUN git clone https://github.com/magento/magento2.git /var/www/html
RUN git clone https://github.com/magento/magento2-sample-data.git /tmp/sample
RUN php -f /tmp/sample/dev/tools/build-sample-data.php -- --ce-source=/var/www/html
RUN composer require developersrede/magento2

USER root
32 changes: 32 additions & 0 deletions magento2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: '3'

services:
mysql:
image: mysql:5.6
container_name: modulo.mysql
environment:
MYSQL_DATABASE: magento
MYSQL_USER: modulo
MYSQL_PASSWORD: rede
MYSQL_ROOT_PASSWORD: rede
networks:
- modulo-rede
volumes:
- .mysql:/var/lib/mysql:z

magento2:
image: magento:2.3
build: .
container_name: modulo.magento-2.3
ports:
- "80:80"
links:
- mysql
depends_on:
- mysql
networks:
- modulo-rede

networks:
modulo-rede:
driver: bridge

0 comments on commit f04d25b

Please sign in to comment.