finish docker integration

This commit is contained in:
pedro 2025-01-29 17:11:58 +01:00
parent a50b28518d
commit cea449c878
4 changed files with 16 additions and 5 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
.git
db.sqlite

View file

@ -1,8 +1,15 @@
####
# DEV OPTIONS
####
DEV_DOCKER_ALWAYS_BUILD=false
# IDHUB # IDHUB
#### ####
IDHUB_DOMAIN=localhost IDHUB_DOMAIN=localhost
IDHUB_ALLOWED_HOSTS=${IDHUB_DOMAIN},${IDHUB_DOMAIN}:9001,127.0.0.1,127.0.0.1:9001 IDHUB_PORT=9001
IDHUB_ALLOWED_HOSTS=${IDHUB_DOMAIN},${IDHUB_DOMAIN}:${IDHUB_PORT},127.0.0.1,127.0.0.1:${IDHUB_PORT}
IDHUB_TIME_ZONE='Europe/Madrid' IDHUB_TIME_ZONE='Europe/Madrid'
#IDHUB_SECRET_KEY='uncomment-it-and-fill-this' #IDHUB_SECRET_KEY='uncomment-it-and-fill-this'
# enable dev flags when DEVELOPMENT deployment # enable dev flags when DEVELOPMENT deployment

View file

@ -26,10 +26,10 @@ services:
- EMAIL_PORT=${IDHUB_EMAIL_PORT} - EMAIL_PORT=${IDHUB_EMAIL_PORT}
- EMAIL_USE_TLS=${IDHUB_EMAIL_USE_TLS} - EMAIL_USE_TLS=${IDHUB_EMAIL_USE_TLS}
- EMAIL_BACKEND=${IDHUB_EMAIL_BACKEND} - EMAIL_BACKEND=${IDHUB_EMAIL_BACKEND}
- SUPPORTED_CREDENTIALS=['CourseCredential', 'EOperatorClaim', 'FederationMembership', 'FinancialVulnerabilityCredential', 'MembershipCard', 'DeviceSnapshotV1'] - SUPPORTED_CREDENTIALS=['CourseCredential', 'EOperatorClaim', 'FederationMembership', 'FinancialVulnerabilityCredential', 'MembershipCard', 'Snapshot']
- SYNC_ORG_DEV=${IDHUB_SYNC_ORG_DEV} - SYNC_ORG_DEV=${IDHUB_SYNC_ORG_DEV}
ports: ports:
- 9001:9001 - ${IDHUB_PORT:-9001}:${IDHUB_PORT:-9001}
# this is for dev # TODO manage volumes dev vs prod
volumes: volumes:
- .:/opt/idhub - .:/opt/idhub

View file

@ -17,7 +17,9 @@ main() {
fi fi
docker compose down -v docker compose down -v
docker compose build if [ "${DEV_DOCKER_ALWAYS_BUILD:-}" = 'true' ]; then
docker compose build
fi
docker compose up ${detach_arg:-} docker compose up ${detach_arg:-}
# TODO docker registry # TODO docker registry