Commit a7065b1b37dba8e62d3ad45b133523757f9ae76d

Authored by George Vlahavas
1 parent dbf4e14722

Add deploy and delete scripts

Showing 2 changed files with 40 additions and 0 deletions

  1 +#!/bin/bash
  2 +# Stop containers and removes containers, networks, volumes, and images
  3 +docker-compose -f docker-compose-jfrog.yml down
  4 +
  5 +# Wait a bit
  6 +sleep 5s
  7 +
  8 +# Check that containers were removed succesfully
  9 +docker ps -a
  1 +#!/bin/sh
  2 +
  3 +# Login into the CUREX registry
  4 +docker login https://registry.curex-project.eu:443/artifactory/curex-local/
  5 +
  6 +# pull all containers
  7 +docker-compose -f docker-compose-jfrog.yml pull
  8 +
  9 +sleep 1
  10 +
  11 +# Prepare installation
  12 +cd api
  13 +cp .env-example .env
  14 +docker run --rm -v $(pwd):/app \
  15 + registry.curex-project.eu:443/curex-local/kea_composer:2.0.7 \
  16 + install
  17 +cd ..
  18 +./create_volumes.sh
  19 +
  20 +# Run containers
  21 +docker-compose -f docker-compose-jfrog.yml up --detach
  22 +# Wait until everything is up, 2 mins should be enough.
  23 +sleep 120
  24 +
  25 +# create and populate the database
  26 +docker-compose exec api php artisan migrate:fresh --seed --force
  27 +
  28 +#Check that everything is running succesfully
  29 +docker ps -a