Skip to content

Commit ce5c7a4

Browse files
committed
Step towards build 108
1 parent c4fd56f commit ce5c7a4

File tree

5 files changed

+30
-33
lines changed

5 files changed

+30
-33
lines changed

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ To run the default 'mysql' container, please name the container 'mysql'
1717
and expose port 3306 for the Magento 2 container to use. For the purpose
1818
of this demo, set the 'root' account password to 'admin'.
1919

20-
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=admin mysql
20+
docker run -d --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=admin \
21+
mysql:5.6
22+
23+
Do check that it started up (the -d makes it run as a daemon in
24+
background) use
25+
26+
docker logs mysql
2127

2228
An interestiong experiment for the reader is to replace the 'mysql'
2329
container with a Maria DB instance.
@@ -28,7 +34,7 @@ several additional environment variables.
2834
docker run --rm --name magento2 -p 80:80 --link mysql:mysql \
2935
-e MYSQL_USER=root -e MYSQL_PASSWORD=admin \
3036
-e PUBLIC_HOST=yourhost.example.com \
31-
alankent/docker-magento2-demo-apache:0.1.0-alpha102
37+
alankent/docker-magento2-demo-apache:0.1.0-alpha108
3238

3339
When this container is started, it loops waiting for a succesful
3440
connection to the MySQL database. Once achieved it runs a PHP script

build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ docker build -t docker-magento2-demo-apache .
44

55
echo To publish use:
66
echo docker tag docker-magento2-demo-apache alankent/docker-magento2-demo-apache
7-
echo docker tag docker-magento2-demo-apache alankent/docker-magento2-demo-apache:0.1.0-alpha102
8-
echo docker push alankent/docker-magento2-demo-apache:0.1.0-alpha102
7+
echo docker tag docker-magento2-demo-apache alankent/docker-magento2-demo-apache:0.1.0-alpha108
8+
echo docker push alankent/docker-magento2-demo-apache:0.1.0-alpha108

config/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "alankent/store",
33
"require": {
44
"magento/magento-composer-installer": "*",
5-
"magento/product-community-edition": "0.1.0-alpha106"
5+
"magento/product-community-edition": "0.1.0-alpha108"
66
},
77
"repositories": [
88
{

scripts/install-magento2

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ rm -rf htdocs
88
mkdir -p htdocs
99

1010
curl -sS https://getcomposer.org/installer | php
11-
php composer.phar install --profile
11+
php composer.phar install
1212

1313
cd htdocs
1414
php -f dev/tools/Magento/Tools/View/deploy.php
@@ -18,8 +18,4 @@ php -f dev/tools/Magento/Tools/Di/compiler.php
1818
echo "SetEnv MAGE_MODE developer" >> .htaccess
1919
#echo "SetEnv MAGE_MODE production" >> .htaccess
2020

21-
# Setup script is independent to main site - set it up too.
22-
cd setup
23-
COMPOSER_PROCESS_TIMEOUT=1000 php ../../composer.phar install --profile
24-
2521
chown www-data:www-data -R /var/www/magento2

scripts/runserver

+18-23
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,24 @@ done
1414

1515
mysql $MYSQLAUTH -e "CREATE DATABASE IF NOT EXISTS magento2"
1616

17-
# Create the Magento local.xml file
18-
if [ ! -f /var/www/magento2/htdocs/app/etc/local.xml ]; then
19-
(
20-
cd /var/www/magento2/htdocs/setup
21-
php -f index.php install \
22-
--cleanup_database \
23-
--db_host=mysql \
24-
--db_name=magento2 \
25-
--db_user="$MYSQL_USER" \
26-
--db_pass="$MYSQL_PASSWORD" \
27-
--backend_frontname=admin \
28-
--base_url=http://$PUBLIC_HOST/ \
29-
--language=en_US \
30-
--timezone=America/Los_Angeles \
31-
--currency=USD \
32-
--admin_lastname=Smith \
33-
--admin_firstname=John \
34-
35-
--admin_username=admin \
36-
--admin_password=admin123 \
37-
--use_secure=0
38-
)
39-
fi
17+
cd /var/www/magento2/htdocs/setup
18+
php -f setup/index.php install \
19+
--cleanup_database \
20+
--db_host=mysql \
21+
--db_name=magento2 \
22+
--db_user="$MYSQL_USER" \
23+
--db_pass="$MYSQL_PASSWORD" \
24+
--backend_frontname=admin \
25+
--base_url=http://$PUBLIC_HOST/ \
26+
--language=en_US \
27+
--timezone=America/Los_Angeles \
28+
--currency=USD \
29+
--admin_lastname=Smith \
30+
--admin_firstname=John \
31+
32+
--admin_username=admin \
33+
--admin_password=admin123 \
34+
--use_secure=0
4035

4136
# Run the web server
4237
exec /usr/sbin/apache2 -D FOREGROUND

0 commit comments

Comments
 (0)