This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added docker-compose and Dockerfile to run pipeline locally
- Loading branch information
1 parent
5b2df6f
commit f59def5
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,3 +84,5 @@ atlassian* | |
!.github/ | ||
!/bin | ||
!/*.xml | ||
!/docker* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM php:7.3-apache | ||
|
||
# Download script to install PHP extensions and dependencies | ||
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/ | ||
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync | ||
|
||
# Install dependencies | ||
RUN apt-get update -y | ||
RUN apt-get install -y nano unzip | ||
RUN install-php-extensions intl gd soap bcmath pdo_mysql xsl zip | ||
|
||
# Install and configure xdebug | ||
RUN yes | pecl install xdebug \ | ||
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ | ||
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ | ||
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ | ||
&& echo "xdebug.mode=coverage" >> /usr/local/etc/php/php.ini | ||
|
||
# Install composer and downgrade to version 1 | ||
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php \ | ||
&& HASH=`curl -sS https://composer.github.io/installer.sig` \ | ||
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ | ||
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \ | ||
&& rm -rf composer-setup.php \ | ||
&& composer self-update --1 | ||
|
||
# Install Magento 2 | ||
COPY bin/install-mg2.sh bin/install-mg2.sh | ||
RUN sh bin/install-mg2.sh | ||
|
||
# Install plugin | ||
COPY src magento2/app/code | ||
|
||
# Fix permissions | ||
RUN chmod 777 -Rf magento2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: '3.7' | ||
|
||
services: | ||
mysql: | ||
image: mysql:5.7 | ||
container_name: magento-database | ||
environment: | ||
MYSQL_DATABASE: magento_test | ||
MYSQL_HOST: 127.0.0.1 | ||
MYSQL_USER: magento | ||
MYSQL_PASSWORD: p@ssw0rd1 | ||
MYSQL_ROOT_PASSWORD: p@ssw0rd1 | ||
ports: | ||
- 3306:3306 | ||
|
||
php: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
username: root | ||
container_name: magento-php | ||
links: | ||
- mysql | ||
ports: | ||
- 8080:80 |