Skip to content

Commit

Permalink
Merge pull request #26 from City-of-Helsinki/UHF-9884
Browse files Browse the repository at this point in the history
UHF-9884: Added entrypoints
  • Loading branch information
tuutti authored Apr 2, 2024
2 parents cca2081 + 280fe1b commit 511d1cd
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 10 deletions.
12 changes: 10 additions & 2 deletions openshift/drupal-repository/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM alpine:3.19
COPY --from=almir/webhook /usr/local/bin/webhook /usr/local/bin/webhook

ARG S6_OVERLAY_VERSION=3.1.6.2
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-x86_64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-x86_64.tar.xz

# We need php and git to build satis.
RUN apk add --no-cache git php82 php82-openssl php82-common php82-json php82-phar php82-mbstring php82-pecl-apcu php82-zip php82-simplexml make

Expand All @@ -15,5 +21,7 @@ RUN \
WORKDIR /etc/webhook
VOLUME ["/etc/webhook"]
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/webhook"]
CMD ["-verbose", "-hooks=/etc/webhook/hooks.json", "-template", "-hotreload", "-debug"]

# Copy configuration files and scripts
COPY files/ /
ENTRYPOINT ["/init"]
11 changes: 3 additions & 8 deletions openshift/drupal-repository/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ ifeq ($(TAG),)
TAG = latest
endif

.PHONY: build push release
.PHONY: push release

default: build

run:
docker run -it --rm -u 100000 $(REPOSITORY):$(TAG) /bin/sh
build:
docker build -t $(REPOSITORY):$(TAG) ./
default: push

push:
docker push $(REPOSITORY):$(TAG)
docker buildx build --pull --platform linux/arm64,linux/amd64 -t $(REPOSITORY):$(TAG) ./ --push

release: build push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/command/with-contenv sh
cd $PROJECT_DIR
make
exec php console.php queue:consume package-queue --item-limit 10;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/command/with-contenv sh
/usr/local/bin/webhook -verbose -hooks=/etc/webhook/hooks.json -template -hotreload -debug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun

0 comments on commit 511d1cd

Please sign in to comment.