-
-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to use integrator and developer profiles
- Loading branch information
Showing
27 changed files
with
519 additions
and
33 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 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,54 @@ | ||
FROM alexcheng/apache2-php7:{{phpVersion}} | ||
|
||
Label maintainer="[email protected]" | ||
|
||
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" \ | ||
&& 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 \ | ||
&& 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,61 @@ | ||
FROM alexcheng/apache2-php7:7.0.24 | ||
|
||
Label maintainer="[email protected]" | ||
|
||
ENV MAGENTO_VERSION 2.1.11 | ||
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" \ | ||
&& 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 \ | ||
&& 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
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,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 |
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
su www-data <<EOSU | ||
ln -s ~/.composer/auth.json /var/www/html/var/composer_home/ | ||
/var/www/html/bin/magento sampledata:deploy | ||
/var/www/html/bin/magento setup:upgrade | ||
/var/www/html/bin/magento setup:di:compile | ||
EOSU |
Oops, something went wrong.