palasangha / Treasures-Of-Dhamma

GNU General Public License v3.0
0 stars 0 forks source link

Archipelago-Local Installation - Mac #49

Closed aryalsujay closed 2 years ago

aryalsujay commented 2 years ago

Archipelago documentation Reference: https://docs.archipelago.nyc/1.0.0/archipelago-deployment-osx/

Pre-requisites:

  1. Install Docker for Mac: https://docs.docker.com/desktop/get-started/
  2. For OSX (macOS) Catalina or Big Sur on Intel (i5/i7) the tested version is: 4.0.1(68347). You may go newer of course.
  3. For Big Sur and Apple Silicon M1 Chips please read https://docs.docker.com/docker-for-mac/apple-silicon/. You may need to enable manual compatibility mode in your docker-compose.yml file for the esmero-php and esmero-cantaloupe containers.
  4. In Preferences-> General: check Use gRPC FUSE for file sharing and restart. Specially if you are using your $HOME folder for deploying, e.g. /Users/username.
  5. In Preferences-> Resources: 4 Gbytes of RAM is the recommended minimun and works; 8 Gbytes is faster and snappier.
  6. Install Github-Destop: https://desktop.github.com/
  7. At least 10 Gbytes of free space (to get started).
  8. Being able to open a terminal.

Start - follow commands:

  1. In your location of choice clone this repo:
cd
cd /Users/tod/Projects
git clone https://github.com/esmero/archipelago-deployment.git archipelago-deployment
cd archipelago-deployment
git checkout 1.0.0
cp docker-compose-arm64.yml docker-compose.yml
docker-compose pull
docker-compose up -d

Access the minio console at http://:9001 with the following credentials:

user:minio
pass:minio123

Once logged in, press on "Buckets" (left tools column) and then on "Create Bucket" (top right) and under "Bucket Name" type archipelago.

cd
cd /Users/tod/Projects/archipelago-deployment
docker exec -ti esmero-php bash -c "composer install"

Once that command finishes run our setup script:

docker exec -ti esmero-php bash -c 'scripts/archipelago/setup.sh'

Deploy Drupal using the provided Configurations run:

docker exec -ti -u www-data esmero-php bash -c "cd web;../vendor/bin/drush -y si --verbose --existing-config --db-url=mysql://root:esmerodb@esmero-db/drupal --account-name=admin --account-pass=archipelago -r=/var/www/html/web --sites-subdir=default --notify=false;drush cr;chown -R www-data:www-data sites;"
docker exec -ti esmero-php bash -c 'scripts/archipelago/deploy.sh'

Archipelago has been deployed locally in your mac - yay!

Now, to add basic setup and configure few settings

Change Base URL of your IIIF Media Server public accessible from the Outside World. to http://<local_ip>:8183/iiif/2

  1. Tick mark Use path-style endpoint
  2. Add public in Public folder.
cd
cd /Users/tod/Projects/archipelago-deployment/web/sites/default
sudo nano settings.php
  1. Press Page down and go the end of the file. Find$settings...s3 type commands.

  2. There, enter one line below this $settings...s3 type commands.

  3. Copy these 2 commands and paste there:

    $settings['s3fs.use_s3_for_public'] = TRUE;
    $settings['s3fs.upload_as_private'] = TRUE;
  4. Press Ctrl+X to save & press Y.

  5. Go to <local_ip>:8001admin/config/media/s3fs/actions , Press Validate & Refresh File Metadata cache.

docker exec -ti esmero-php bash -c "composer require 'drupal/admin_toolbar:^3.1'" 
docker exec -ti esmero-php bash -c "drush en -y admin_toolbar" 

Go to modules and install Admin Toolbar Extra Tools and Admin Toolbar Search module.

All Basic Setup added for local deployment!