From 2f2aba2f94f291bf0708ca3c4647a222c7db22c0 Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Mon, 17 May 2021 11:47:39 +0000 Subject: [PATCH] Update matrix-webhook/Dockerfile, matrix-webhook/Makefile files --- matrix-webhook/Dockerfile | 29 +++++++++++++++++++++++++++++ matrix-webhook/Makefile | 5 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 matrix-webhook/Dockerfile diff --git a/matrix-webhook/Dockerfile b/matrix-webhook/Dockerfile new file mode 100644 index 0000000..5bf29a7 --- /dev/null +++ b/matrix-webhook/Dockerfile @@ -0,0 +1,29 @@ +FROM node:16.1.0-alpine3.13 as builder + +COPY . /app +WORKDIR /app +ENV NODE_ENV=development +RUN apk add --no-cache -t build-deps make gcc g++ python libc-dev wget git dos2unix \ + && apk add --no-cache ca-certificates + +RUN npm install -g npm-check-updates +RUN ncu -t minor -u \ + && ncu -u matrix-appservice-bridge +RUN npm install \ + && dos2unix docker-start.sh \ + && chmod +x docker-start.sh \ + +FROM node:16.1.0-alpine3.13 + +COPY --from=builder /app /app +ENV NODE_ENV=production +ENV WEBHOOKS_USER_STORE_PATH=/data/user-store.db +ENV WEBHOOKS_ROOM_STORE_PATH=/data/room-store.db +ENV WEBHOOKS_DB_CONFIG_PATH=/data/database.json +ENV WEBHOOKS_ENV=docker + +WORKDIR /app +CMD /app/docker-start.sh + +EXPOSE 9000 +VOLUME ["/data"] \ No newline at end of file diff --git a/matrix-webhook/Makefile b/matrix-webhook/Makefile index 8e3bc83..11fa8b3 100644 --- a/matrix-webhook/Makefile +++ b/matrix-webhook/Makefile @@ -1,5 +1,5 @@ NAMESPACE=alemairebe -VERSION=0.0.1 +VERSION=0.0.2 IMAGE=matrix-webhook @@ -16,4 +16,5 @@ build: --cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ --cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ --tag ${NAMESPACE}/${IMAGE}:$(VERSION) \ - --tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) matrix-appservice-webhooks-master + --tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) \ + -f Dockerfile matrix-appservice-webhooks-master