upload lafede pilot deployment script
This commit is contained in:
parent
8e9c03d8fb
commit
85d7c19083
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -u
|
||||||
|
# DEBUG
|
||||||
|
set -x
|
||||||
|
|
||||||
|
# a wallet and verifier idhub for pilot-lafede
|
||||||
|
main() {
|
||||||
|
deployment="${1:-}"
|
||||||
|
|
||||||
|
# detach on production deployment
|
||||||
|
if [ "${deployment}" = 'prod' ]; then
|
||||||
|
detach='-d'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ensure uses pilot-lafede branch
|
||||||
|
(
|
||||||
|
cd ./IdHub
|
||||||
|
git checkout pilot-lafede
|
||||||
|
)
|
||||||
|
|
||||||
|
postfix='pilot-lafede'
|
||||||
|
local idhub1="idhub1__${postfix}"
|
||||||
|
|
||||||
|
# force recreate
|
||||||
|
rm -rf "./${idhub1}"
|
||||||
|
|
||||||
|
# detect if is new
|
||||||
|
if [ ! -f "./${idhub1}" ]; then
|
||||||
|
echo 'Detected new deployment, recreating git repos idhub1 and idhub2'
|
||||||
|
cp -rp IdHub "${idhub1}"
|
||||||
|
rm -f "${idhub1}/db.sqlite3"
|
||||||
|
fi
|
||||||
|
|
||||||
|
idhub_dc_f="docker-compose__${postfix}.yml"
|
||||||
|
docker compose -f ${idhub_dc_f} down -v || true
|
||||||
|
make idhub_build \
|
||||||
|
&& docker compose -f ${idhub_dc_f} up ${detach:-}
|
||||||
|
}
|
||||||
|
|
||||||
|
main "${@}"
|
|
@ -0,0 +1,31 @@
|
||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
|
||||||
|
idhub1:
|
||||||
|
container_name: idhub1
|
||||||
|
init: true
|
||||||
|
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
|
||||||
|
environment:
|
||||||
|
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
|
||||||
|
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
|
||||||
|
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
|
||||||
|
- STATIC_ROOT=${IDHUB_STATIC_ROOT:-/static/}
|
||||||
|
- MEDIA_ROOT=${IDHUB_MEDIA_ROOT:-/media/}
|
||||||
|
- PORT=${IDHUB_PORT:-9001}
|
||||||
|
- DJANGO_SUPERUSER_USERNAME=${IDHUB_USER}
|
||||||
|
- DJANGO_SUPERUSER_PASSWORD=${IDHUB_PASSWD}
|
||||||
|
- DJANGO_SUPERUSER_EMAIL=${IDHUB_EMAIL}
|
||||||
|
- DOMAIN=https://idhub1-lafede.demo.pangea.org
|
||||||
|
- CSRF_TRUSTED_ORIGINS=https://idhub1-lafede.demo.pangea.org
|
||||||
|
- DEFAULT_FROM_EMAIL=${IDHUB_DEFAULT_FROM_EMAIL}
|
||||||
|
- EMAIL_HOST=${IDHUB_EMAIL_HOST}
|
||||||
|
- EMAIL_HOST_USER=${IDHUB_EMAIL_HOST_USER}
|
||||||
|
- EMAIL_HOST_PASSWORD=${IDHUB_EMAIL_HOST_PASSWORD}
|
||||||
|
- EMAIL_PORT=${IDHUB_EMAIL_PORT}
|
||||||
|
- EMAIL_USE_TLS=${IDHUB_EMAIL_USE_TLS}
|
||||||
|
- EMAIL_BACKEND=${IDHUB_EMAIL_BACKEND}
|
||||||
|
- SUPPORTED_CREDENTIALS=['MembershipCard']
|
||||||
|
ports:
|
||||||
|
- 9031:9001
|
||||||
|
volumes:
|
||||||
|
- ./idhub1__pilot-lafede:/opt/idhub
|
Reference in New Issue