Skip to content

Commit

Permalink
Fix file location and permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferya committed May 29, 2024
1 parent df5b228 commit 7dcd0fc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ ISLE_REPOSITORY=islandora
#
# This should match image.isle.tag value in the Helm chart.
# PHP 8.1 remote registry
ISLE_TAG=2.0.0
ISLE_TAG=3.2.4
# PHP 8.1 local registry (i.e., isle-buildkit images built locally)
# ISLE_TAG=latest

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ RUN --mount=type=cache,id=bagger-composer-${TARGETARCH},sharing=locked,target=/r
--strip \
--dest "/var/www/bagger" \
&& \
composer install -d /var/www/bagger
chown -R nginx:nginx /var/www/bagger \
&& \
su -s /bin/bash nginx -c "composer install -d /var/www/bagger" \
# `--no-dev` leads to install error - ToDo revise composer.json
# APP_ENV=prod composer install -d /var/www/bagger --no-dev
# composer install -d /var/www/bagger --no-dev
Expand Down
13 changes: 8 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ secrets:

volumes:
bagger-data: {}
bagger-aip: {}

# Common to all services
x-common: &common
Expand Down Expand Up @@ -41,6 +42,7 @@ services:
BAGGER_CROND_ENABLE_SERVICE: ${BAGGER_CROND_ENABLE_SERVICE:-"true"}
BAGGER_CROND_SCHEDULE: ${BAGGER_CROND_SCHEDULE:-1 2 * * *}
BAGGER_CROND_LOG_LEVEL: ${BAGGER_CROND_LOG_LEVEL:-"8"}
BAGGER_OUTPUT_DIR: ${BAGGER_OUTPUT_DIR:-"/data/aip/"}
BAGGER_BAG_DOWNLOAD_PREFIX: ${BAGGER_BAG_DOWNLOAD_PREFIX:-""} # unused
BAGGER_DEFAULT_PER_BAG_NAME_TEMPLATE: ${BAGGER_DEFAULT_PER_BAG_NAME_TEMPLATE:-"aip_%"}
BAGGER_DEFAULT_PER_BAG_CONTACT_NAME: ${BAGGER_DEFAULT_PER_BAG_CONTACT_NAME:-Contact Name}
Expand All @@ -51,12 +53,13 @@ services:
BAGGER_DEFAULT_PER_BAG_LOG_BAG_CREATION: ${BAGGER_DEFAULT_PER_BAG_LOG_BAG_CREATION:-"true"}
BAGGER_DEFAULT_PER_BAG_LOG_BAG_LOCATION: ${BAGGER_DEFAULT_PER_BAG_LOG_BAG_LOCATION:-"false"}
BAGGER_DEFAULT_PER_BAG_REGISTER_BAGS_WITH_ISLANDORA: ${BAGGER_DEFAULT_PER_BAG_REGISTER_BAGS_WITH_ISLANDORA:-"false"}
image: ${REPOSITORY}/bagger:${TAG}
image: ${REPOSITORY}/cwrc/isle-bagger:${TAG}
ports:
- 9856:8000
secrets:
- source: UID
- source: GID
- source: BAGGER_DRUPAL_DEFAULT_ACCOUNT_PASSWORD
# secrets:
# - source: UID
# - source: GID
# - source: BAGGER_DRUPAL_DEFAULT_ACCOUNT_PASSWORD
volumes:
- bagger-data:/var/www/bagger/var
- bagger-aip:${BAGGER_OUTPUT_DIR:-/data/aip}
7 changes: 7 additions & 0 deletions rootfs/etc/s6-overlay/scripts/bagger-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ EOF
fi
}

function setup_dir {
mkdir -p ${BAGGER_OUTPUT_DIR}
chown nginx:nginx ${BAGGER_OUTPUT_DIR}
chmod 02755 ${BAGGER_OUTPUT_DIR}
}

function main {
setup_cron
setup_dir
}

main

0 comments on commit 7dcd0fc

Please sign in to comment.