Skip to content

Commit

Permalink
fix: we need double clone (1 for each instance)
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBaghbani committed Sep 19, 2024
1 parent 4ebfc0a commit c81eb31
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dev/ocm-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ docker network inspect testnet >/dev/null 2>&1 || docker network create testnet
# username: username for sign in into efss.
# password: password for sign in into efss.
# Nextclouds.
createEfss nextcloud 1 einstein relativity ocm-nextcloud
createEfss nextcloud 2 michiel dejong ocm-nextcloud
createEfss nextcloud 1 einstein relativity ocm-nextcloud1
createEfss nextcloud 2 michiel dejong ocm-nextcloud2

###############
### Firefox ###
Expand Down
25 changes: 20 additions & 5 deletions init/ocm-nextcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,35 @@ REPO_NEXTCLOUD=https://github.com/SUNET/nextcloud-server
BRANCH_NEXTCLOUD=master

# Nextcloud source code.
[ ! -d "ocm-nextcloud" ] && \
[ ! -d "ocm-nextcloud1" ] && \
git clone \
--depth 1 \
--branch ${BRANCH_NEXTCLOUD} \
--recursive \
--shallow-submodules \
${REPO_NEXTCLOUD} \
ocm-nextcloud \
ocm-nextcloud1 \
&& \
mkdir -p "${ENV_ROOT}/ocm-nextcloud/data" \
mkdir -p "${ENV_ROOT}/ocm-nextcloud1/data" \
&& \
touch "${ENV_ROOT}/ocm-nextcloud/data/nextcloud.log" \
touch "${ENV_ROOT}/ocm-nextcloud1/data/nextcloud.log" \
&& \
sudo chown -R www-data:www-data "${ENV_ROOT}/ocm-nextcloud"
sudo chown -R www-data:www-data "${ENV_ROOT}/ocm-nextcloud1"

[ ! -d "ocm-nextcloud2" ] && \
git clone \
--depth 1 \
--branch ${BRANCH_NEXTCLOUD} \
--recursive \
--shallow-submodules \
${REPO_NEXTCLOUD} \
ocm-nextcloud2 \
&& \
mkdir -p "${ENV_ROOT}/ocm-nextcloud2/data" \
&& \
touch "${ENV_ROOT}/ocm-nextcloud2/data/nextcloud.log" \
&& \
sudo chown -R www-data:www-data "${ENV_ROOT}/ocm-nextcloud2"

docker network inspect testnet >/dev/null 2>&1 || docker network create testnet

Expand Down

0 comments on commit c81eb31

Please sign in to comment.