diff --git a/Makefile b/Makefile index 00336af..f89deb2 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ project := dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral -# docker images # docker images #### @@ -31,8 +30,8 @@ idhub_tag := ${idhub_branch}__${idhub_commit} idhub_image := ${project}/idhub:${idhub_tag} docker_build: - #docker build -f docker/orchestra.Dockerfile -t ${orchestra_image} . - #docker build -f docker/musician.Dockerfile -t ${musician_image} . + docker build -f docker/orchestra.Dockerfile -t ${orchestra_image} -t ${project}/orchestra:latest . + #docker build -f docker/musician.Dockerfile -t ${musician_image} -t ${project}/musician:latest . docker build -f docker/idhub.Dockerfile -t ${idhub_image} -t ${project}/idhub:latest . @printf "\n##########################\n" @printf "\nimage: ${orchestra_image}\n" diff --git a/docker-compose_orchestra-temp.yml b/docker-compose_orchestra-temp.yml new file mode 100644 index 0000000..18e4c29 --- /dev/null +++ b/docker-compose_orchestra-temp.yml @@ -0,0 +1,15 @@ +version: "3.9" +services: + + orchestra: + init: true + image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/orchestra:latest + environment: + - SECRET_KEY=${ORCHESTRA_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd} + ports: + - "9080:9080" + # TODO configure volumes + #volumes: + # - .:/home + + diff --git a/orchestra_build.sh b/orchestra_build.sh new file mode 100755 index 0000000..77d5b45 --- /dev/null +++ b/orchestra_build.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e +set -u +# DEBUG +set -x + +main() { + deployment="${1:-}" + + # detach on production deployment + if [ "${deployment}" = 'prod' ]; then + detach='-d' + fi + + dcf='docker-compose_orchestra-temp.yml' + docker compose -f ${dcf} down -v \ + && make docker_build \ + && docker compose -f ${dcf} up ${detach:-} +} + +main "${@}"