-
-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
676 additions
and
71 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
.bash_history | ||
node_modules |
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
FROM quay.io/alexcheng1982/apache2-php7:{{phpVersion}} | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL php_version="{{phpVersion}}" | ||
LABEL magento_version="{{magento2Version}}" | ||
LABEL description="Magento {{magento2Version}} with PHP {{phpVersion}}" | ||
|
||
ENV MAGENTO_VERSION {{magento2Version}} | ||
ENV INSTALL_DIR /var/www/html | ||
ENV COMPOSER_HOME /var/www/.composer/ | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php \ | ||
&& mv composer.phar /usr/local/bin/composer | ||
COPY ./auth.json $COMPOSER_HOME | ||
|
||
RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev unzip" \ | ||
&& apt-get update \ | ||
&& apt-get install -y $requirements \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | ||
&& docker-php-ext-install gd \ | ||
&& docker-php-ext-install mcrypt \ | ||
&& docker-php-ext-install mbstring \ | ||
&& docker-php-ext-install zip \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install xsl \ | ||
&& docker-php-ext-install soap \ | ||
&& docker-php-ext-install bcmath \ | ||
&& requirementsToRemove="libpng12-dev libmcrypt-dev libcurl3-dev libpng12-dev libfreetype6-dev libjpeg-turbo8-dev" \ | ||
&& apt-get purge --auto-remove -y $requirementsToRemove | ||
|
||
RUN chsh -s /bin/bash www-data | ||
|
||
{{{magento2Installation}}} | ||
|
||
RUN cd $INSTALL_DIR \ | ||
&& find . -type d -exec chmod 770 {} \; \ | ||
&& find . -type f -exec chmod 660 {} \; \ | ||
&& chmod u+x bin/magento | ||
|
||
COPY ./install-magento /usr/local/bin/install-magento | ||
RUN chmod +x /usr/local/bin/install-magento | ||
|
||
COPY ./install-sampledata /usr/local/bin/install-sampledata | ||
RUN chmod +x /usr/local/bin/install-sampledata | ||
|
||
RUN a2enmod rewrite | ||
RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini | ||
|
||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
WORKDIR $INSTALL_DIR | ||
|
||
# Add cron job | ||
ADD crontab /etc/cron.d/magento2-cron | ||
RUN chmod 0644 /etc/cron.d/magento2-cron \ | ||
&& crontab -u www-data /etc/cron.d/magento2-cron |
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 was deleted.
Oops, something went wrong.
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,3 @@ | ||
* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log | ||
* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex | ||
{{{extraCronJobs}}} |
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,65 @@ | ||
FROM quay.io/alexcheng1982/apache2-php7:7.1.24 | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL php_version="7.1.24" | ||
LABEL magento_version="2.2.7" | ||
LABEL description="Magento 2.2.7 with PHP 7.1.24" | ||
|
||
ENV MAGENTO_VERSION 2.2.7 | ||
ENV INSTALL_DIR /var/www/html | ||
ENV COMPOSER_HOME /var/www/.composer/ | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php \ | ||
&& mv composer.phar /usr/local/bin/composer | ||
COPY ./auth.json $COMPOSER_HOME | ||
|
||
RUN requirements="libpng12-dev libmcrypt-dev libmcrypt4 libcurl3-dev libfreetype6 libjpeg-turbo8 libjpeg-turbo8-dev libpng12-dev libfreetype6-dev libicu-dev libxslt1-dev unzip" \ | ||
&& apt-get update \ | ||
&& apt-get install -y $requirements \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& docker-php-ext-install pdo_mysql \ | ||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ | ||
&& docker-php-ext-install gd \ | ||
&& docker-php-ext-install mcrypt \ | ||
&& docker-php-ext-install mbstring \ | ||
&& docker-php-ext-install zip \ | ||
&& docker-php-ext-install intl \ | ||
&& docker-php-ext-install xsl \ | ||
&& docker-php-ext-install soap \ | ||
&& docker-php-ext-install bcmath \ | ||
&& requirementsToRemove="libpng12-dev libmcrypt-dev libcurl3-dev libpng12-dev libfreetype6-dev libjpeg-turbo8-dev" \ | ||
&& apt-get purge --auto-remove -y $requirementsToRemove | ||
|
||
RUN chsh -s /bin/bash www-data | ||
|
||
RUN cd /tmp && \ | ||
curl https://codeload.github.com/magento/magento2/tar.gz/$MAGENTO_VERSION -o $MAGENTO_VERSION.tar.gz && \ | ||
tar xvf $MAGENTO_VERSION.tar.gz && \ | ||
mv magento2-$MAGENTO_VERSION/* magento2-$MAGENTO_VERSION/.htaccess $INSTALL_DIR | ||
|
||
RUN chown -R www-data:www-data /var/www | ||
RUN su www-data -c "cd $INSTALL_DIR && composer install" | ||
RUN su www-data -c "cd $INSTALL_DIR && composer config repositories.magento composer https://repo.magento.com/" | ||
|
||
RUN cd $INSTALL_DIR \ | ||
&& find . -type d -exec chmod 770 {} \; \ | ||
&& find . -type f -exec chmod 660 {} \; \ | ||
&& chmod u+x bin/magento | ||
|
||
COPY ./install-magento /usr/local/bin/install-magento | ||
RUN chmod +x /usr/local/bin/install-magento | ||
|
||
COPY ./install-sampledata /usr/local/bin/install-sampledata | ||
RUN chmod +x /usr/local/bin/install-sampledata | ||
|
||
RUN a2enmod rewrite | ||
RUN echo "memory_limit=2048M" > /usr/local/etc/php/conf.d/memory-limit.ini | ||
|
||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
WORKDIR $INSTALL_DIR | ||
|
||
# Add cron job | ||
ADD crontab /etc/cron.d/magento2-cron | ||
RUN chmod 0644 /etc/cron.d/magento2-cron \ | ||
&& crontab -u www-data /etc/cron.d/magento2-cron |
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,8 @@ | ||
{ | ||
"http-basic": { | ||
"repo.magento.com": { | ||
"username": "5310458a34d580de1700dfe826ff19a1", | ||
"password": "255059b03eb9d30604d5ef52fca7465d" | ||
} | ||
} | ||
} |
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,3 @@ | ||
* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log | ||
* * * * * www-data /usr/local/bin/php /var/www/html/bin/magento indexer:reindex | ||
|
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,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
su www-data <<EOSU | ||
/var/www/html/bin/magento setup:install --base-url=$MAGENTO_URL --backend-frontname=$MAGENTO_BACKEND_FRONTNAME --language=$MAGENTO_LANGUAGE --timezone=$MAGENTO_TIMEZONE --currency=$MAGENTO_DEFAULT_CURRENCY --db-host=$MYSQL_HOST --db-name=$MYSQL_DATABASE --db-user=$MYSQL_USER --db-password=$MYSQL_PASSWORD --use-secure=$MAGENTO_USE_SECURE --base-url-secure=$MAGENTO_BASE_URL_SECURE --use-secure-admin=$MAGENTO_USE_SECURE_ADMIN --admin-firstname=$MAGENTO_ADMIN_FIRSTNAME --admin-lastname=$MAGENTO_ADMIN_LASTNAME --admin-email=$MAGENTO_ADMIN_EMAIL --admin-user=$MAGENTO_ADMIN_USERNAME --admin-password=$MAGENTO_ADMIN_PASSWORD | ||
EOSU |
File renamed without changes.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
version: '3.0' | ||
services: | ||
web: | ||
build: . | ||
build: ./developer | ||
ports: | ||
- "80:80" | ||
links: | ||
|
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,25 @@ | ||
version: '3.0' | ||
services: | ||
web: | ||
image: 9a940b8e81ff | ||
ports: | ||
- "80:80" | ||
links: | ||
- db | ||
env_file: | ||
- env | ||
db: | ||
image: mysql:5.6.23 | ||
volumes: | ||
- db-data:/var/lib/mysql/data | ||
env_file: | ||
- env | ||
phpmyadmin: | ||
image: phpmyadmin/phpmyadmin | ||
container_name: phpmyadmin | ||
ports: | ||
- "8580:80" | ||
links: | ||
- db | ||
volumes: | ||
db-data: |
Oops, something went wrong.