Commit 387ae8a6 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Ajout d'une "pause" dans l'execution de la MAJ de la BDD afin d'être sûr que Postgresql est UP

parent 2c61b9fe
Loading
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ services:
  # --------------------------------------------------------------------------------------------------------------------
  # ELASTIC DEARCH
  £CONTAINER_ELASTICSEARCH:
    depends_on:
      - £CONTAINER_OSCAR
    container_name: £CONTAINER_ELASTICSEARCH
    environment:
      - discovery.type=single-node
+9 −4
Original line number Diff line number Diff line
#!/bin/sh
echo "COMPOSER INSTALL"
cd /opt/OscarApp

# Composer
composer install

# DOCTRINE (MAJ Schema)
php vendor/bin/doctrine-module orm:schema-tool:update --force

# PATH Access
chmod -R 777 data/DoctrineORMModule

until PGPASSWORD="azerty" psql -h "£CONTAINER_POSTGRESQL" -U "oscar" "oscar_dev" -c '\q'; do
  >&2 echo "Postgres is unavailable - sleeping"
  sleep 1
done

# DOCTRINE (MAJ Schema)
php vendor/bin/doctrine-module orm:schema-tool:update --force

### DEMO DATAS
php bin/oscar.php auth:sync install/demo/authentification.json
php bin/oscar.php organizations:sync-json install/demo/organizations.json
php bin/oscar.php persons:sync-json install/demo/persons.json
php bin/oscar.php activity:import-json -f install/demo/activity.json
php bin/oscar.php check:privileges -n
php bin/oscar.php check:privileges -n