Skip to content

Commit

Permalink
Update ldapproxy image and service configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed Feb 26, 2024
1 parent 1dcad9e commit bae875b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ set -e
images=()
repobase="${REPOBASE:-ghcr.io/nethserver}"

reponame="ldapproxy"
reponame="ldapproxy-binary"
container=$(buildah from docker.io/library/nginx:1.25.3-alpine)
buildah run "${container}" /bin/sh <<'EOF'
set -e
apk add --no-cache ca-certificates
EOF
# Commit the image
buildah commit --rm "${container}" "${repobase}/${reponame}"
# Append the image URL to the images array
images+=("${repobase}/${reponame}")

reponame="ldapproxy"
container=$(buildah from scratch)
buildah add "${container}" imageroot /imageroot
buildah add "${container}" ui /ui
buildah config \
--label='org.nethserver.tcp-ports-demand=8' \
--label='org.nethserver.flags=core_module no_data_backup' \
--label="org.nethserver.images=${repobase}/ldapproxy:${IMAGETAG:-latest}" \
--entrypoint=/ "${container}"
--label="org.nethserver.images=${repobase}/ldapproxy-binary:${IMAGETAG:-latest}" \
"${container}"
buildah commit "${container}" "${repobase}/${reponame}"
images+=("${repobase}/${reponame}")

Expand Down
2 changes: 1 addition & 1 deletion imageroot/systemd/user/ldapproxy.service
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ExecStart=/usr/bin/podman run \
--network=host \
--replace --name=%N \
--volume=./nginx:/srv:z \
${LDAPPROXY_IMAGE} nginx -g "daemon off;" -c /srv/nginx.conf
${LDAPPROXY_BINARY_IMAGE} nginx -g "daemon off;" -c /srv/nginx.conf
ExecReload=-/usr/local/bin/runagent update-conf
ExecReload=/usr/bin/podman exec %N nginx -s reload
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/ldapproxy.ctr-id -t 10
Expand Down

0 comments on commit bae875b

Please sign in to comment.