Skip to content

Commit

Permalink
Update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreGauthier committed Jan 16, 2025
1 parent c48def0 commit 60ecbd0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ORO_ORGANIZATION_NAME=ORO
ORO_LANGUAGE=en
ORO_FORMATTING_CODE=en_US
ORO_APP_PROTOCOL=http
ORO_APP_DOMAIN=oro.localhost
ORO_NGINX_HOST=web
ORO_INSTALL_OPTIONS=

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,25 @@ jobs:
RESET_DB : ${{ inputs.reset_database }}
run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} "
ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -i private_key ${USER_NAME}@${HOSTNAME} "
cd /home/ubuntu/ &&
[ -d oro ] || git clone https://github.com/Elastic-Suite/oro-demo.git oro &&
cd /home/ubuntu/oro &&
[ -d src/packages/GallyPlugin ] || git clone https://github.com/Elastic-Suite/gally-oro-connector.git src/packages/GallyPlugin &&
docker system prune -af &&
([[ $(docker volume ls -q | awk '!/_/' | wc -l) -eq 0 ]] || docker volume rm $(docker volume ls -q | awk '!/_/' | tr '\n' ' ')) &&
docker compose down &&
docker compose -f compose.yml down &&
git remote -v &&
git fetch --all && git reset --hard && git checkout ${{ env.BRANCH }} &&
cd /home/ubuntu/oro/src/packages/GallyPlugin &&
git remote -v &&
git fetch --all && git reset --hard && git checkout ${{ env.BRANCH }} &&
cd /home/ubuntu/oro &&
docker compose -f compose.yml run --rm install composer install --no-dev &&
docker compose -f compose.yml build &&
docker compose -f compose.yml run --rm install composer install --no-dev &&
docker compose -f compose.yml run --rm install composer config repositories.gally-connector '{ \"type\": \"path\", \"url\": \"./packages/GallyPlugin\", \"options\": { \"versions\": { \"gally/oro-plugin\": \"2.0.0\"}} }' &&
docker compose -f compose.yml run --rm install composer require gally/oro-plugin:2.0.0
echo 'Reset db value: ${RESET_DB}' &&
[ -z ${RESET_DB} ] || docker compose -f compose.yml up install &&
docker compose -f compose.yml up -d --build
ORO_APP_DOMAIN=$HOSTNAME docker compose -f compose.yml up -d
"
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ services:
args:
UID: ${UID}
GID: ${GID}
command: console oro:install --no-interaction --timeout=3600 --user-name="$ORO_USER_NAME" --user-email="$ORO_USER_EMAIL" --user-firstname="$ORO_USER_FIRSTNAME" --user-lastname="$ORO_USER_LASTNAME" --user-password="$ORO_USER_PASSWORD" --sample-data="$ORO_SAMPLE_DATA" --organization-name="$ORO_ORGANIZATION_NAME" --language=$ORO_LANGUAGE --formatting-code=$ORO_FORMATTING_CODE --application-url="$ORO_APP_PROTOCOL://$ORO_APP_DOMAIN" $ORO_INSTALL_OPTIONS
command: console oro:install --no-interaction --timeout=3600 --user-name="$ORO_USER_NAME" --user-email="$ORO_USER_EMAIL" --user-firstname="$ORO_USER_FIRSTNAME" --user-lastname="$ORO_USER_LASTNAME" --user-password="$ORO_USER_PASSWORD" --sample-data="$ORO_SAMPLE_DATA" --organization-name="$ORO_ORGANIZATION_NAME" --language=$ORO_LANGUAGE --formatting-code=$ORO_FORMATTING_CODE --application-url="$ORO_APP_PROTOCOL://$ORO_APP_DOMAIN" --drop-database $ORO_INSTALL_OPTIONS
user: $ORO_USER_RUNTIME
env_file: .env
depends_on:
Expand Down
3 changes: 2 additions & 1 deletion src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
"symfony/runtime": true,
"symfony/flex": true,
"php-http/discovery": false
}
},
"process-timeout": 900
},
"scripts": {
"post-install-cmd": [
Expand Down

0 comments on commit 60ecbd0

Please sign in to comment.