diff --git a/cozystack/Dockerfile b/cozystack/Dockerfile index 095c6c26ec66cea6bd49cb46767b0e32197c7460..64611aecfdb45551d84e3e4a382a248dd275ed2e 100644 --- a/cozystack/Dockerfile +++ b/cozystack/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:20.10 AS installer -ARG COZY_VERSION=1.4.18 +ARG COZY_VERSION=1.4.36 ARG NODE_VERSION=12.13.0 WORKDIR /tmp diff --git a/cozystack/install.sh b/cozystack/install.sh index 99a4ca485f2181809dc142275e02f1a0af32cfbf..d195087e6dcc42e96b33e945b2ffe3224ce54c9d 100755 --- a/cozystack/install.sh +++ b/cozystack/install.sh @@ -17,10 +17,10 @@ fi echo "Install cozy-stack..." -wget -O /tmp/cozy-stack-linux-${COZY_ARCH}-${COZY_VERSION} https://github.com/cozy/cozy-stack/releases/download/${COZY_VERSION}/cozy-stack-linux-${COZY_ARCH} -wget -O /tmp/cozy.sha256 https://github.com/cozy/cozy-stack/releases/download/${COZY_VERSION}/cozy-stack.sha256 +wget -O /tmp/cozy-stack-linux-${COZY_ARCH}-${COZY_VERSION} https://github.com/cozy/cozy-stack/releases/download/${COZY_VERSION}/cozy-stack-linux-${COZY_ARCH}-${COZY_VERSION} +wget -O /tmp/cozy.sha256 https://github.com/cozy/cozy-stack/releases/download/${COZY_VERSION}/cozy-stack-linux-${COZY_ARCH}-${COZY_VERSION}.sha256 -grep linux-${COZY_ARCH} /tmp/cozy.sha256 > /tmp/SHA256 +awk '/cozy-stack-linux-'${COZY_ARCH}'-'${COZY_VERSION}'/{print $NF " cozy-stack-linux-'${COZY_ARCH}'-'${COZY_VERSION}'"}' /tmp/cozy.sha256 > /tmp/SHA256 echo "Expected checkum : $(cat /tmp/SHA256)" echo "Checksum of the downloaded file : $(sha256sum --tag /tmp/cozy-stack-linux-${COZY_ARCH}-${COZY_VERSION})" diff --git a/create-instance.sh b/create-instance.sh index 034bab72a49c85b87b79d4d810aa531ec367ff54..0dc17db56daf23f90af79ce9ab2a66bec3c74e70 100755 --- a/create-instance.sh +++ b/create-instance.sh @@ -10,6 +10,10 @@ INSTANCE_ID=$1 if [ "$2" = "oidc" ]; then OIDC_CONTEXT="--context-name open-id-connect" +else + #Use for service Pilote app / No impact for other instance + OIDC_CONTEXT="--context-name pilotedemo" + echo "Context pilotedemo added" fi source .env @@ -21,10 +25,11 @@ echo "Creating instance ${INSTANCE_ID}.${COZY_TLD} ..." docker-compose exec cozy ./cozy instances add $OIDC_CONTEXT --host 0.0.0.0 --apps drive,collect,settings,home "${INSTANCE_ID}.${COZY_TLD}" | tee "${TMPFILE}" # Install grand lyon apps -docker-compose exec cozy ./cozy konnectors install enedis --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build -docker-compose exec cozy ./cozy konnectors install grdf --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-konnector.git#build -docker-compose exec cozy ./cozy konnectors install egl --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git#build -docker-compose exec cozy ./cozy apps install ecolyo --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build +docker-compose exec cozy ./cozy konnectors install enedisgrandlyon --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build-dev +docker-compose exec cozy ./cozy konnectors install grdfgrandlyon --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-konnector.git#build-dev +docker-compose exec cozy ./cozy konnectors install eglgrandlyon --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git#build-dev +docker-compose exec cozy ./cozy apps install ecolyo --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build-dev +docker-compose exec cozy ./cozy apps install pilote --domain "${INSTANCE_ID}.${COZY_TLD}" git://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git#build-dev ## To replace by registry://store/something after next cozy-stack release docker-compose exec cozy ./cozy apps install --domain "${INSTANCE_ID}.${COZY_TLD}" store registry://store/stable | tee -a "${TMPFILE}" diff --git a/db-init.sh b/db-init.sh index 1f7662da162799744498fb2d12d1e24127407ec0..2d9cf18c17bbf75201b476304218738c86022257 100755 --- a/db-init.sh +++ b/db-init.sh @@ -8,4 +8,6 @@ source .env docker-compose exec db curl -X PUT -d "{\"_id\":\"eglgrandlyon\",\"grant_mode\":\"secret\",\"slug\":\"eglgrandlyon\",\"secret\":{\"eglBaseURL\":\"${EGL_BASE_URL}\",\"eglAPIAuthKey\":\"${EGL_API_AUTH_KEY}\"}}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/eglgrandlyon docker-compose exec db curl -X PUT -d "{\"_id\":\"enedisgrandlyon\",\"grant_mode\":\"authorization_code\",\"client_id\":\"${ENEDIS_CLIENT_ID}\",\"client_secret\":\"${ENEDIS_CLIENT_SECRET}\",\"auth_endpoint\":\"${ENEDIS_AUTH_ENDPOINT}\",\"token_endpoint\": \"${ENEDIS_TOKEN_ENDPOINT}\",\"token_mode\":\"get\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/enedisgrandlyon -docker-compose exec db curl -X PUT -d "{\"_id\":\"grdfgrandlyon\",\"grant_mode\":\"authorization_code\",\"client_id\":\"${GRDF_CLIENT_ID}\",\"client_secret\":\"${GRDF_CLIENT_SECRET}\",\"auth_endpoint\":\"${GRDF_AUTH_ENDPOINT}\",\"token_endpoint\": \"${GRDF_TOKEN_ENDPOINT}\",\"token_mode\":\"get\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/grdfgrandlyon \ No newline at end of file +docker-compose exec db curl -X PUT -d "{\"_id\":\"grdfgrandlyon\",\"grant_mode\":\"authorization_code\",\"client_id\":\"${GRDF_CLIENT_ID}\",\"client_secret\":\"${GRDF_CLIENT_SECRET}\",\"auth_endpoint\":\"${GRDF_AUTH_ENDPOINT}\",\"token_endpoint\": \"${GRDF_TOKEN_ENDPOINT}\",\"token_mode\":\"get\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-account_types/grdfgrandlyon +docker-compose exec db curl -X PUT -d "{\"_id\":\"cc.cozycloud.dacc.dev\",\"token\":\"${DACC_DEV_TOKEN}\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-remote-secrets/cc.cozycloud.dacc.dev +docker-compose exec db curl -X PUT -d "{\"_id\":\"org.ecolyo.dju\",\"token\":\"${API_DATAGRANDLYON_TOKEN}\"}" http://127.0.0.1:5984/secrets%2Fio-cozy-remote-secrets/org.ecolyo.dju diff --git a/docker-compose.yml b/docker-compose.yml index 92b1cd1d103051926d0e35ffba97fdd880da7a40..8d68f971564533e54fca560a5b4f13aeff4dc6e8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,13 +11,14 @@ services: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro logging: - driver: "json-file" + driver: loki options: - max-size: "1M" - max-file: "10" + loki-url: http://localhost:3100/loki/api/v1/push restart: unless-stopped ports: - - 5984:5984 + - 5984:5984 + networks: + - cozy-network cozy: image: npernoud/easy-cozy:latest-amd64 @@ -37,12 +38,13 @@ services: depends_on: - db logging: - driver: "json-file" + driver: loki options: - max-size: "1M" - max-file: "10" + loki-url: http://localhost:3100/loki/api/v1/push restart: unless-stopped - + networks: + - cozy-network + keycloak: image: jboss/keycloak:latest volumes: @@ -55,3 +57,8 @@ services: - KEYCLOAK_USER=admin - KEYCLOAK_PASSWORD=admin - KEYCLOAK_IMPORT=/tmp/kc/realm.json + networks: + - cozy-network + +networks: + cozy-network: diff --git a/update_apps.sh b/update_apps.sh index b76d94bd0a446acaf57505385baedf8c29ea898a..c6993770c6ad02b55ff6bff8d13a6ace9f5822e8 100755 --- a/update_apps.sh +++ b/update_apps.sh @@ -3,4 +3,5 @@ echo "Updating Apps ..." -docker-compose exec cozy ./cozy apps update ecolyo --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build +docker-compose exec cozy ./cozy apps update ecolyo --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo.git#build-dev +# docker-compose exec cozy ./cozy apps install pilote --all-domains git://forge.grandlyon.com/solidarite/monparcourssocial/mps-usager.git#build diff --git a/update_konnectors.sh b/update_konnectors.sh index 691e65d64e58117178e587b496d9728b9307a554..4fb2ace6d676307b70da9bf78e5b96082e46b9a8 100644 --- a/update_konnectors.sh +++ b/update_konnectors.sh @@ -3,6 +3,6 @@ echo "Updating Konnectors ..." -docker-compose exec cozy ./cozy konnectors update enedisgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build -docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-konnector.git#build -docker-compose exec cozy ./cozy konnectors update eglgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git#build +docker-compose exec cozy ./cozy konnectors update enedisgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/enedis-konnector.git#build-dev +docker-compose exec cozy ./cozy konnectors update grdfgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/grdf-konnector.git#build-dev +docker-compose exec cozy ./cozy konnectors update eglgrandlyon --all-domains git://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git#build-dev