Skip to content
Snippets Groups Projects
Commit b2270240 authored by Nicolas PERNOUD's avatar Nicolas PERNOUD
Browse files

fix: download apps and connectors locally before installing from file://

parent 2c90e0d8
Branches
No related tags found
No related merge requests found
data data
.env .env
\ No newline at end of file /apps_sources
\ No newline at end of file
...@@ -17,10 +17,10 @@ echo "Creating instance ${INSTANCE_ID}.${COZY_TLD} ..." ...@@ -17,10 +17,10 @@ echo "Creating instance ${INSTANCE_ID}.${COZY_TLD} ..."
docker-compose exec cozy ./cozy instances add --host 0.0.0.0 --apps drive,collect,settings,home "${INSTANCE_ID}.${COZY_TLD}" | tee "${TMPFILE}" docker-compose exec cozy ./cozy instances add --host 0.0.0.0 --apps drive,collect,settings,home "${INSTANCE_ID}.${COZY_TLD}" | tee "${TMPFILE}"
# Install grand lyon apps # Install grand lyon apps
docker-compose exec cozy ./cozy konnectors install enedis-scraping-connector --domain=${INSTANCE_ID}.${COZY_TLD} https://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector/-/archive/build/enedis-scraping-connector-build.tar docker-compose exec cozy ./cozy konnectors install enedis-scraping-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///apps_sources/enedis-scraping-connector-build
docker-compose exec cozy ./cozy konnectors install grdf-scraping-connector --domain=${INSTANCE_ID}.${COZY_TLD} https://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector/-/archive/master/grdf-scraping-connector-master.tar docker-compose exec cozy ./cozy konnectors install grdf-scraping-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///apps_sources/grdf-scraping-connector-build
docker-compose exec cozy ./cozy konnectors install egl-api-connector --domain=${INSTANCE_ID}.${COZY_TLD} https://forge.grandlyon.com/pocs/cozy/egl-api-connector/-/archive/master/egl-api-connector-master.tar docker-compose exec cozy ./cozy konnectors install egl-api-connector --domain "${INSTANCE_ID}.${COZY_TLD}" file:///apps_sources/egl-api-connector-build
docker-compose exec cozy ./cozy apps install energy-dataviz --domain=${INSTANCE_ID}.${COZY_TLD} https://forge.grandlyon.com/pocs/cozy/energy-dataviz/-/archive/master/energy-dataviz-master.tar docker-compose exec cozy ./cozy apps install energy-dataviz --domain "${INSTANCE_ID}.${COZY_TLD}" file:///apps_sources/energy-dataviz-build
## To replace by registry://store/something after next cozy-stack release ## 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}" docker-compose exec cozy ./cozy apps install --domain "${INSTANCE_ID}.${COZY_TLD}" store registry://store/stable | tee -a "${TMPFILE}"
......
...@@ -30,6 +30,7 @@ services: ...@@ -30,6 +30,7 @@ services:
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
- ./cozystack/cozy.yaml:/etc/cozy/cozy.yaml - ./cozystack/cozy.yaml:/etc/cozy/cozy.yaml
- ./apps_sources:/apps_sources
ports: ports:
- 8080:8080 - 8080:8080
depends_on: depends_on:
......
#!/bin/bash
# Get apps and connectors
mkdir ./apps_sources
cd apps_sources
rm -rf *
wget https://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector/-/archive/build/enedis-scraping-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector/-/archive/build/grdf-scraping-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/egl-api-connector/-/archive/build/egl-api-connector-build.tar.gz
wget https://forge.grandlyon.com/pocs/cozy/energy-dataviz/-/archive/build/energy-dataviz-build.tar.gz
# Untar all
for a in $(ls -1 *.tar.gz); do tar -zxvf $a; done
rm -f *.tar.gz
# Force the cozy stack version
# see https://cloud.docker.com/swarm/vsellier/repository/docker/vsellier/easy-cozy/tags for all available versions
# Examples :
# COZY_STACK_VERSION=latest
# COZY_STACK_VERSION=2018M2S5
# The place to store the database content # The place to store the database content
DATABASE_DIRECTORY=./data/db DATABASE_DIRECTORY=./data/db
......
#!/bin/bash #!/bin/bash
# Initialise your cozy cloud / reset it if it already exists (this will delete all your data and instances) # Initialise your cozy cloud / reset it if it already exists (this will delete all your data and instances)
# Download the apps
./download_apps.sh
# build the image if it doesn't exists # build the image if it doesn't exists
if [[ "$(docker images -q npernoud/easy-cozy:latest-amd64 2> /dev/null)" == "" ]]; then if [[ "$(docker images -q npernoud/easy-cozy:latest-amd64 2> /dev/null)" == "" ]]; then
./build/build-docker-image.sh ./build/build-docker-image.sh
......
File mode changed from 100644 to 100755
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
echo "Updating Apps & Konnectors ..." echo "Updating Apps & Konnectors ..."
docker-compose exec cozy ./cozy konnectors update enedis-scraping-connector --all-domains git://forge.grandlyon.com/pocs/cozy/enedis-scraping-connector.git#build docker-compose exec cozy ./cozy konnectors update enedis-scraping-connector --all-domains file:///apps_sources/enedis-scraping-connector-build
docker-compose exec cozy ./cozy apps update energy-dataviz --all-domains git://forge.grandlyon.com/pocs/cozy/energy-dataviz.git#build docker-compose exec cozy ./cozy konnectors update grdf-scraping-connector --all-domains file:///apps_sources/grdf-scraping-connector-build
docker-compose exec cozy ./cozy konnectors update grdf-scraping-connector --all-domains git://forge.grandlyon.com/pocs/cozy/grdf-scraping-connector.git#build docker-compose exec cozy ./cozy konnectors update egl-api-connector --all-domains file:///apps_sources/egl-api-connector-build
docker-compose exec cozy ./cozy konnectors update egl-api-connector --all-domains git://forge.grandlyon.com/pocs/cozy/egl-api-connector.git#build docker-compose exec cozy ./cozy apps update energy-dataviz --all-domains file:///apps_sources/energy-dataviz-build
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment