Skip to content
Snippets Groups Projects
Select Git revision
  • d759464105f3ff1f2b113eb3f64e51db3e9275f6
  • master default protected
  • replication_test
  • release-1.10 protected
  • dev protected
  • 556-usage-statistics
  • 553-semantic-recommendation-2
  • 553-semantic-recommendation
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • v1.10.4 protected
  • v1.10.3 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
41 results

install.sh

Blame
  • install.sh 1.47 KiB
    #!/bin/bash
    
    # dependency
    if [ "$USER" != "root" ]; then
      echo "This script needs sudo privileges!"
      exit 1
    fi
    
    # dependency
    docker info > /dev/null
    if [ $? -ne 0 ]; then
      echo "Docker is not installed (or accessible in bash) on your system:"
      echo ""
      echo "  - install docker from https://docs.docker.com/desktop/install/linux-install/"
      echo "  - make sure the docker executable is in \$PATH"
      exit 2
    fi
    
    # environment
    echo "[🚀] Gathering environment ..."
    curl -sSL -o .env https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/.env.unix.example
    curl -sSL -o docker-compose.yml https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/docker-compose.prod.yml
    curl -sSL -o dbrepo.conf https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/dbrepo-gateway-service/dbrepo.conf
    curl -sSL -o setup-schema_local.sql https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/dbrepo-metadata-db/setup-schema_local.sql
    
    echo "[📦] Pulling images ..."
    docker compose pull
    
    MAX_MAP_COUNT=$(cat /proc/sys/vm/max_map_count)
    if [ "$MAX_MAP_COUNT" -lt 262144 ]; then
      echo "[🚀] Preparing environment ..."
      echo "vm.max_map_count=262144" >> /etc/sysctl.conf
      sysctl -p
    fi
    
    echo "[✨] Starting DBRepo ..."
    docker compose up -d
    
    if [ $? -eq 0 ]; then
      echo "[🎉] Successfully started!"
      echo ""
      echo "You can now inspect the logs with:"
      echo ""
      echo "  docker compose logs -f"
      echo ""
    fi