#!/bin/sh
# Login into the CUREX registry
docker login https://registry.curex-project.eu:443/artifactory/curex-local/
# pull all containers
docker-compose -f docker-compose-jfrog.yml pull
sleep 1
# Prepare installation
cd api
cp .env-example .env
docker run --rm -v $(pwd):/app \
registry.curex-project.eu:443/curex-local/kea_composer:2.0.7 \
install
cd ..
./create_volumes.sh
# Run containers
docker-compose -f docker-compose-jfrog.yml up --detach
# Wait until everything is up, 2 mins should be enough.
sleep 120
# create and populate the database
docker-compose exec api php artisan migrate:fresh --seed --force
#Check that everything is running succesfully
docker ps -a