Skip to content

Commit

Permalink
Merge pull request #2 from Islandora-Devops/main
Browse files Browse the repository at this point in the history
Pull changes from islandora
  • Loading branch information
Tristaan authored Mar 2, 2021
2 parents d5297cd + cc0b0d3 commit e1b7f56
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
25 changes: 20 additions & 5 deletions base/rootfs/etc/cont-init.d/00-container-environment-00-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,26 @@ set -e
# Write those to the container environment if not already present. The container
# environment has already been initialized by this point and contains levels 3 and
# 4 as mentioned in the top of this file.
/bin/exec -c \
s6-envdir -fn -- /etc/defaults \
s6-envdir -fn -- /var/run/s6/container_environment \
s6-envdir -fn -- /run/secrets \
s6-dumpenv -- /var/run/s6/container_environment

# Temporary conditional to prevent issues with Kubernetes as `s6-envdir` expects the
# folder to contain only files, Kubernetes mounts a folder in this location and works
# with secrets in a different way. At a later time we'll revisit our convention to
# hopefully support all that Kuberentes has to offer while not degrading the
# quality of Swarm or Docker Compose. At the moment Kubernetes users will need
# to inject the secrets as environment variables. Please see
# https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets-as-environment-variables
if [[ $(find /run/secrets -mindepth 1 -maxdepth 1 -type d | wc -l) > 0 ]]; then
/bin/exec -c \
s6-envdir -fn -- /etc/defaults \
s6-envdir -fn -- /var/run/s6/container_environment \
s6-dumpenv -- /var/run/s6/container_environment
else
/bin/exec -c \
s6-envdir -fn -- /etc/defaults \
s6-envdir -fn -- /var/run/s6/container_environment \
s6-envdir -fn -- /run/secrets \
s6-dumpenv -- /var/run/s6/container_environment
fi

# Temporary directory to deposit generated confd configuration templates and
# output, etc.
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}
}
dependencies {
classpath("ca.islandora:isle-gradle-docker-plugin:0.0.2")
classpath("ca.islandora:isle-gradle-docker-plugin:0.0.3")
classpath("com.palantir.gradle.gitversion:gradle-git-version:0.12.3")
}
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
org.gradle.caching=true
org.gradle.parallel=true
# The project can be build with/without Buildkit for those on older versions of Docker earlier than '18.09' or who
# cannot use the 'overlay2' filesystem with Docker due to using an earlier kernel version than 4.0.
Expand Down

0 comments on commit e1b7f56

Please sign in to comment.