Skip to content

Commit

Permalink
magento
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 25, 2023
1 parent 37e10f9 commit 5be19f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/magento/.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ W9_LOGIN_USER=admin
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD

# If no domain, should use Internet IP replace it. e.g 47.243.184.40, don't add :port for magneto url here
W9_URL=appname.example.com
W9_URL=""
W9_URL_REPLACE=true

W9_ADMIN_PATH=/admin
Expand Down
6 changes: 5 additions & 1 deletion apps/magento/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
/bin/sh -c "
apt update -y
apt install -y --no-install-recommends wget
while [ ! -f /data/vendor/magento/language-zh_hans_cn ]; do
while [ ! -d /data/vendor/magento/language-zh_hans_cn ]; do
echo 'Waiting for bin/magento to be created...'
sleep 10
done
Expand All @@ -43,6 +43,10 @@ services:
cd /data
bin/magento setup:static-content:deploy zh_Hans_CN
bin/magento indexer:reindex
if [ -z \"$W9_URL\" ]; then
echo 'W9_URL is empty, not need to change, exiting...'
exit 0
fi
if [[ $W9_URL =~ ^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ ]]; then
wp_url=$W9_URL:$W9_HTTP_PORT_SET
echo 'URL is IP'
Expand Down

0 comments on commit 5be19f6

Please sign in to comment.