Skip to content

Commit c325c20

Browse files
committed
Update base dockers
1 parent b7e335f commit c325c20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1012
-35
lines changed

base/images/7.1-apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN docker-php-source extract \
5151
&& docker-php-source delete
5252

5353
# Prepare install and CMD script
54-
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh /tmp/
54+
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh config_files/docker_branch_run.sh /tmp/
5555

5656
# If handle dynamic domain
5757
COPY config_files/docker_updt_ps_domains.php /tmp/
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
# Clone repository
4+
if [ ! -f /var/www/html/composer.json ]; then
5+
echo Clone PrestaShop $PS_BRANCH
6+
git clone -b $PS_BRANCH https://github.com/PrestaShop/PrestaShop.git /var/www/html
7+
chown -R www-data:www-data /var/www/html
8+
fi
9+
10+
# Install composer
11+
if [ ! -f /usr/local/bin/composer ]; then
12+
echo "\n* Install composer ...";
13+
mkdir -p /var/www/.composer
14+
chown -R www-data:www-data /var/www/.composer
15+
runuser -g www-data -u www-data -- php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php
16+
if [ ! -f /usr/local/bin/composer ]; then
17+
echo Composer installation failed
18+
exit 1
19+
fi
20+
fi
21+
22+
# Install vendor dependencies
23+
if [ ! -f /var/www/html/vendor/autoload.php ]; then
24+
echo "\n* Running composer ...";
25+
pushd /var/www/html
26+
# Execute composer as default user so that we can set the env variables to increase timeout, also disable default_socket_timeout for php
27+
COMPOSER_PROCESS_TIMEOUT=600 COMPOSER_IPRESOLVE=4 php -ddefault_socket_timeout=-1 /usr/local/bin/composer install --ansi --prefer-dist --no-interaction --no-progress
28+
# Update the owner of composer installed folders to be www-data
29+
chown -R www-data:www-data vendor modules themes
30+
popd
31+
fi
32+
33+
# Build assets
34+
if [ "${DISABLE_MAKE}" != "1" ]; then
35+
mkdir -p /var/www/.npm
36+
chown -R www-data:www-data /var/www/.npm
37+
38+
echo "\n* Install node $NODE_VERSION...";
39+
export NVM_DIR=/usr/local/nvm
40+
mkdir -p $NVM_DIR \
41+
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
42+
&& . $NVM_DIR/nvm.sh \
43+
&& nvm install $NODE_VERSION \
44+
&& nvm alias default $NODE_VERSION \
45+
&& nvm use default
46+
47+
export NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin
48+
export PATH=$PATH:$NODE_PATH
49+
50+
pushd /var/www/html
51+
echo "\n* Build assets ...";
52+
runuser -g www-data -u www-data -- /usr/bin/make assets
53+
54+
echo "\n* Wait for assets built...";
55+
runuser -g www-data -u www-data -- /usr/bin/make wait-assets
56+
popd
57+
else
58+
echo "\n* Build of assets was disabled...";
59+
fi
60+
61+
/tmp/docker_run.sh

base/images/7.1-apache/config_files/docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if [ ! -f ./config/settings.inc.php ] && [ ! -f ./install.lock ]; then
8989
runuser -g www-data -u www-data -- php -d memory_limit=-1 /var/www/html/$PS_FOLDER_INSTALL/index_cli.php \
9090
--domain="$PS_DOMAIN" --db_server=$DB_SERVER:$DB_PORT --db_name="$DB_NAME" --db_user=$DB_USER \
9191
--db_password=$DB_PASSWD --prefix="$DB_PREFIX" --firstname="John" --lastname="Doe" \
92-
--password=$ADMIN_PASSWD --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
92+
--password="$ADMIN_PASSWD" --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
9393
--all_languages=$PS_ALL_LANGUAGES --newsletter=0 --send_email=0 --ssl=$PS_ENABLE_SSL
9494

9595
if [ $? -ne 0 ]; then

base/images/7.1-fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN docker-php-source extract \
5151
&& docker-php-source delete
5252

5353
# Prepare install and CMD script
54-
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh /tmp/
54+
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh config_files/docker_branch_run.sh /tmp/
5555

5656
# If handle dynamic domain
5757
COPY config_files/docker_updt_ps_domains.php /tmp/
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
# Clone repository
4+
if [ ! -f /var/www/html/composer.json ]; then
5+
echo Clone PrestaShop $PS_BRANCH
6+
git clone -b $PS_BRANCH https://github.com/PrestaShop/PrestaShop.git /var/www/html
7+
chown -R www-data:www-data /var/www/html
8+
fi
9+
10+
# Install composer
11+
if [ ! -f /usr/local/bin/composer ]; then
12+
echo "\n* Install composer ...";
13+
mkdir -p /var/www/.composer
14+
chown -R www-data:www-data /var/www/.composer
15+
runuser -g www-data -u www-data -- php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php
16+
if [ ! -f /usr/local/bin/composer ]; then
17+
echo Composer installation failed
18+
exit 1
19+
fi
20+
fi
21+
22+
# Install vendor dependencies
23+
if [ ! -f /var/www/html/vendor/autoload.php ]; then
24+
echo "\n* Running composer ...";
25+
pushd /var/www/html
26+
# Execute composer as default user so that we can set the env variables to increase timeout, also disable default_socket_timeout for php
27+
COMPOSER_PROCESS_TIMEOUT=600 COMPOSER_IPRESOLVE=4 php -ddefault_socket_timeout=-1 /usr/local/bin/composer install --ansi --prefer-dist --no-interaction --no-progress
28+
# Update the owner of composer installed folders to be www-data
29+
chown -R www-data:www-data vendor modules themes
30+
popd
31+
fi
32+
33+
# Build assets
34+
if [ "${DISABLE_MAKE}" != "1" ]; then
35+
mkdir -p /var/www/.npm
36+
chown -R www-data:www-data /var/www/.npm
37+
38+
echo "\n* Install node $NODE_VERSION...";
39+
export NVM_DIR=/usr/local/nvm
40+
mkdir -p $NVM_DIR \
41+
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
42+
&& . $NVM_DIR/nvm.sh \
43+
&& nvm install $NODE_VERSION \
44+
&& nvm alias default $NODE_VERSION \
45+
&& nvm use default
46+
47+
export NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin
48+
export PATH=$PATH:$NODE_PATH
49+
50+
pushd /var/www/html
51+
echo "\n* Build assets ...";
52+
runuser -g www-data -u www-data -- /usr/bin/make assets
53+
54+
echo "\n* Wait for assets built...";
55+
runuser -g www-data -u www-data -- /usr/bin/make wait-assets
56+
popd
57+
else
58+
echo "\n* Build of assets was disabled...";
59+
fi
60+
61+
/tmp/docker_run.sh

base/images/7.1-fpm/config_files/docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if [ ! -f ./config/settings.inc.php ] && [ ! -f ./install.lock ]; then
8989
runuser -g www-data -u www-data -- php -d memory_limit=-1 /var/www/html/$PS_FOLDER_INSTALL/index_cli.php \
9090
--domain="$PS_DOMAIN" --db_server=$DB_SERVER:$DB_PORT --db_name="$DB_NAME" --db_user=$DB_USER \
9191
--db_password=$DB_PASSWD --prefix="$DB_PREFIX" --firstname="John" --lastname="Doe" \
92-
--password=$ADMIN_PASSWD --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
92+
--password="$ADMIN_PASSWD" --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
9393
--all_languages=$PS_ALL_LANGUAGES --newsletter=0 --send_email=0 --ssl=$PS_ENABLE_SSL
9494

9595
if [ $? -ne 0 ]; then

base/images/7.2-apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN docker-php-source extract \
5151
&& docker-php-source delete
5252

5353
# Prepare install and CMD script
54-
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh /tmp/
54+
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh config_files/docker_branch_run.sh /tmp/
5555

5656
# If handle dynamic domain
5757
COPY config_files/docker_updt_ps_domains.php /tmp/
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash
2+
3+
# Clone repository
4+
if [ ! -f /var/www/html/composer.json ]; then
5+
echo Clone PrestaShop $PS_BRANCH
6+
git clone -b $PS_BRANCH https://github.com/PrestaShop/PrestaShop.git /var/www/html
7+
chown -R www-data:www-data /var/www/html
8+
fi
9+
10+
# Install composer
11+
if [ ! -f /usr/local/bin/composer ]; then
12+
echo "\n* Install composer ...";
13+
mkdir -p /var/www/.composer
14+
chown -R www-data:www-data /var/www/.composer
15+
runuser -g www-data -u www-data -- php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php
16+
if [ ! -f /usr/local/bin/composer ]; then
17+
echo Composer installation failed
18+
exit 1
19+
fi
20+
fi
21+
22+
# Install vendor dependencies
23+
if [ ! -f /var/www/html/vendor/autoload.php ]; then
24+
echo "\n* Running composer ...";
25+
pushd /var/www/html
26+
# Execute composer as default user so that we can set the env variables to increase timeout, also disable default_socket_timeout for php
27+
COMPOSER_PROCESS_TIMEOUT=600 COMPOSER_IPRESOLVE=4 php -ddefault_socket_timeout=-1 /usr/local/bin/composer install --ansi --prefer-dist --no-interaction --no-progress
28+
# Update the owner of composer installed folders to be www-data
29+
chown -R www-data:www-data vendor modules themes
30+
popd
31+
fi
32+
33+
# Build assets
34+
if [ "${DISABLE_MAKE}" != "1" ]; then
35+
mkdir -p /var/www/.npm
36+
chown -R www-data:www-data /var/www/.npm
37+
38+
echo "\n* Install node $NODE_VERSION...";
39+
export NVM_DIR=/usr/local/nvm
40+
mkdir -p $NVM_DIR \
41+
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash \
42+
&& . $NVM_DIR/nvm.sh \
43+
&& nvm install $NODE_VERSION \
44+
&& nvm alias default $NODE_VERSION \
45+
&& nvm use default
46+
47+
export NODE_PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin
48+
export PATH=$PATH:$NODE_PATH
49+
50+
pushd /var/www/html
51+
echo "\n* Build assets ...";
52+
runuser -g www-data -u www-data -- /usr/bin/make assets
53+
54+
echo "\n* Wait for assets built...";
55+
runuser -g www-data -u www-data -- /usr/bin/make wait-assets
56+
popd
57+
else
58+
echo "\n* Build of assets was disabled...";
59+
fi
60+
61+
/tmp/docker_run.sh

base/images/7.2-apache/config_files/docker_run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if [ ! -f ./config/settings.inc.php ] && [ ! -f ./install.lock ]; then
8989
runuser -g www-data -u www-data -- php -d memory_limit=-1 /var/www/html/$PS_FOLDER_INSTALL/index_cli.php \
9090
--domain="$PS_DOMAIN" --db_server=$DB_SERVER:$DB_PORT --db_name="$DB_NAME" --db_user=$DB_USER \
9191
--db_password=$DB_PASSWD --prefix="$DB_PREFIX" --firstname="John" --lastname="Doe" \
92-
--password=$ADMIN_PASSWD --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
92+
--password="$ADMIN_PASSWD" --email="$ADMIN_MAIL" --language=$PS_LANGUAGE --country=$PS_COUNTRY \
9393
--all_languages=$PS_ALL_LANGUAGES --newsletter=0 --send_email=0 --ssl=$PS_ENABLE_SSL
9494

9595
if [ $? -ne 0 ]; then

base/images/7.2-fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ RUN docker-php-source extract \
5151
&& docker-php-source delete
5252

5353
# Prepare install and CMD script
54-
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh /tmp/
54+
COPY config_files/ps-extractor.sh config_files/docker_run.sh config_files/docker_nightly_run.sh config_files/docker_branch_run.sh /tmp/
5555

5656
# If handle dynamic domain
5757
COPY config_files/docker_updt_ps_domains.php /tmp/

0 commit comments

Comments
 (0)