Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-9395: ddev-ibexa-cloud add-on #2599

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Conversation

adriendupuis
Copy link
Contributor

@adriendupuis adriendupuis commented Jan 20, 2025

Question Answer
JIRA Ticket IBX-9395
Versions 4.6, master
Edition All
  • Update DDEV Ibexa Cloud add-on. PREVIEW
  • Details how to add Composer authentication to Ibexa Cloud project. PREVIEW

Checklist

  • Text renders correctly
  • Text has been checked with vale
  • Description metadata is up to date
  • Redirects cover removed/moved pages
  • Code samples are working
  • PHP code samples have been fixed with PHP CS fixer
  • Added link to this PR in relevant JIRA ticket or code PR

@adriendupuis adriendupuis changed the title ddev_and_ibexa_cloud.md IBX-9395: ddev-ibexa-cloud add-on Jan 21, 2025
@adriendupuis
Copy link
Contributor Author

adriendupuis commented Jan 22, 2025

Test with and without ddev/ddev-ibexa-cloud v0.1.0

set -x

DIR=XXXXXXXX
PROJECT=XXXXXXXXXXX
ENVIRONMENT=production
INSTALLATION_KEY=XXXXXXXXXXXXXXXXXX
TOKEN_PASSWORD=XXXXXXXXXXXXXXXXXXXXXX
IBEXA_CLI_TOKEN=XXXXXXXXXXXXXXXXXXXXX
HTTPS_PORT=8443
HTTP_PORT=8080

USE_IBEXA_CLOUD_DDEV_ADDON=1

if [ -e $DIR ]; then
  cd $DIR
  ddev delete --omit-snapshot --yes
  cd -
  rm -rf $DIR
fi

set -e


if [ 1 -eq $USE_IBEXA_CLOUD_DDEV_ADDON ]; then


ibexa_cloud project:get $PROJECT $DIR && cd $DIR
ddev config --project-type=php --php-version 8.1 --web-environment-add COMPOSER_AUTH='',DATABASE_URL=mysql://db:db@db:3306/db --router-http-port=$HTTP_PORT --router-https-port=$HTTPS_PORT
ddev config --web-environment-add IBEXA_PROJECT=$PROJECT,IBEXA_ENVIRONMENT=$ENVIRONMENT,IBEXA_APP=app
ddev config --web-environment-add IBEXA_CLI_TOKEN=$IBEXA_CLI_TOKEN
echo '.ddev/' >> .gitignore
mkdir -p .ddev/homeadditions/.composer && echo "{\"http-basic\": {\"updates.ibexa.co\": {\"username\": \"$INSTALLATION_KEY\", \"password\": \"$TOKEN_PASSWORD\"}}}" > .ddev/homeadditions/.composer/auth.json
ddev add-on get ddev/ddev-ibexa-cloud             
ddev start
ddev composer install
ddev pull ibexa-cloud -y
ddev describe
ddev launch  


else


ibexa_cloud project:get $PROJECT $DIR --environment=$ENVIRONMENT && cd $DIR
ddev config --project-type=php --php-version 8.1 --docroot=public --web-environment-add DATABASE_URL=mysql://db:db@db:3306/db --router-http-port=$HTTP_PORT --router-https-port=$HTTPS_PORT
echo '.ddev/' >> .gitignore
ddev start
ddev composer config --global http-basic.updates.ibexa.co $INSTALLATION_KEY $TOKEN_PASSWORD
ibexa_cloud db:dump --gzip --file=$ENVIRONMENT.sql.gz --environment=$ENVIRONMENT
ddev import-db --src=$ENVIRONMENT.sql.gz && rm $ENVIRONMENT.sql.gz
ibexa_cloud mount:download --mount public/var --target public/var --yes
ddev composer install
ddev describe
ddev launch  


fi

@adriendupuis
Copy link
Contributor Author

After ddev/ddev-ibexa-cloud#9 I use both add-ons at the same time.

(mind the macOS sed -i '')

ibexa_cloud project:get $PROJECT $DIR && cd $DIR
ddev config --project-type=php --web-environment-add COMPOSER_AUTH='' --router-http-port=$HTTP_PORT --router-https-port=$HTTPS_PORT
ddev config --web-environment-add IBEXA_PROJECT=$PROJECT,IBEXA_ENVIRONMENT=$ENVIRONMENT,IBEXA_APP=app
ddev config --web-environment-add IBEXA_CLI_TOKEN=$IBEXA_CLI_TOKEN
echo '.ddev/' >> .gitignore
mkdir -p .ddev/homeadditions/.composer && echo "{\"http-basic\": {\"updates.ibexa.co\": {\"username\": \"$INSTALLATION_KEY\", \"password\": \"$TOKEN_PASSWORD\"}}}" > .ddev/homeadditions/.composer/auth.json
ddev add-on get ddev/ddev-platformsh
sed -i '' 's/maxmemory-policy allkeys-lfu/maxmemory-policy volatile-lfu/' .ddev/redis/redis.conf
ddev add-on get ddev/ddev-ibexa-cloud
ddev start
ddev pull ibexa-cloud -y
ddev describe
ddev launch  

@adriendupuis adriendupuis marked this pull request as ready for review January 22, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant