Compare commits

...

4 commits

Author SHA1 Message Date
pedro 265a28c051 idhub: tag with latest, and use it in dcompose 2023-11-03 10:13:28 +01:00
pedro 712e1e9947 idhub: add envs for idhub namespace 2023-11-03 10:12:09 +01:00
pedro 4c7e6bd3c9 idhub: add CSRF_TRUSTED_ORIGINS env var 2023-11-03 10:11:30 +01:00
pedro 93d1f2d01c idhub build: add detach on production env 2023-11-03 09:59:56 +01:00
4 changed files with 22 additions and 3 deletions

View file

@ -10,3 +10,14 @@
# specially useful if you want to deploy in a specific domain
#MUSICIAN_API_BASE_URL='https://orchestra.example.org'
#MUSICIAN_ALLOWED_HOSTS='musician.example.org'
# IDHUB
####
#IDHUB_SECRET_KEY='uncomment-it-and-fill-this'
IDHUB_USER='admin'
IDHUB_PASSWD='admin'
IDHUB_EMAIL='admin@example.org'
# enable dev flags when DEVELOPMENT deployment
IDHUB_DEPLOYMENT='DEVELOPMENT'
# adapt to your domain in a production/reverse proxy env
IDHUB_CSRF_TRUSTED_ORIGINS='https://idhub.example.org'

View file

@ -33,7 +33,7 @@ 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/idhub.Dockerfile -t ${idhub_image} .
docker build -f docker/idhub.Dockerfile -t ${idhub_image} -t ${project}/idhub:latest .
@printf "\n##########################\n"
@printf "\nimage: ${orchestra_image}\n"
@printf "\nimage: ${musician_image}\n"

View file

@ -3,7 +3,7 @@ services:
idhub:
init: true
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:main__233d8df
image: dkr-dsg.ac.upc.edu/trustchain-oc1-orchestral/idhub:latest
environment:
- SECRET_KEY=${IDHUB_SECRET_KEY:-publicsecretisnotsecureVtmKBfxpVV47PpBCF2Nzz2H6qnbd}
- ALLOWED_HOSTS=${IDHUB_ALLOWED_HOSTS:-*}
@ -14,5 +14,6 @@ services:
- DJANGO_SUPERUSER_PASSWORD=${IDHUB_PASSWD}
- DJANGO_SUPERUSER_EMAIL=${IDHUB_EMAIL}
- DEPLOYMENT=${IDHUB_DEPLOYMENT}
- CSRF_TRUSTED_ORIGINS=${IDHUB_CSRF_TRUSTED_ORIGINS}
ports:
- 7000:7000

View file

@ -6,10 +6,17 @@ set -u
set -x
main() {
deployment="${1:-}"
# detach on production deployment
if [ "${deployment}" = 'prod' ]; then
detach='-d'
fi
idhub_dc_f='docker-compose_idhub-temp.yml'
docker compose -f ${idhub_dc_f} down -v \
&& make docker_build \
&& docker compose -f ${idhub_dc_f} up
&& docker compose -f ${idhub_dc_f} up ${detach:-}
}
main "${@}"