From 5f90ce6eb930219cbf45ef5b072111e0a00078fd Mon Sep 17 00:00:00 2001 From: Siroco Date: Sun, 24 Oct 2021 19:00:04 +0200 Subject: [PATCH] Add: Installer on Dockerfile and Entrypoint --- Dockerfile | 12 ++++++++++++ entrypoint.sh | 1 + 2 files changed, 13 insertions(+) diff --git a/Dockerfile b/Dockerfile index 496b5bc..c3f66fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,16 @@ RUN yarn install && \ yarn build && \ yarn pack --filename=gancio.tgz +RUN apt-get install -y --no-install-recomends golang + +WORKDIR / + +COPY installer . + +WORKDIR /installer + +RUN go get . && \ + go build -o gancio-installer # --- # FROM registry.sindominio.net/debian @@ -49,6 +59,8 @@ WORKDIR /gancio RUN npm install --production && \ ln -s /gancio/server/cli.js /usr/bin/gancio +COPY --from=builder /installer/gancio-installer /usr/bin/gancio-installer + ADD entrypoint.sh / RUN chmod 755 /entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index 2bd3c51..91b0719 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,6 +9,7 @@ mkdir -p /data/uploads [ -f /data/config.json ] || touch /data/config.json # crear una configuracion por defecto # TODO: arranca el web installer - #goforms? +/usr/bin/gancio-installer [ -s /data/config.json ] || cp /gancio/config.json.example /data/config.json # Admin Email Configuration [ -n $GANCIO_ADMIN_EMAIL ] && sed -i "s/\"admin_email\".*/\"admin_email\": \"$GANCIO_ADMIN_EMAIL\"/g" /data/config.json