From 5408129838e0dbccc63ba0cf8de787a534d0ae0f Mon Sep 17 00:00:00 2001 From: infogulch Date: Wed, 5 May 2021 18:21:52 -0500 Subject: [PATCH] Update to latest, fixes proxyauth issue, build directly --- CloudronManifest.json | 2 +- Dockerfile | 21 +++++++++++++++++---- example.env.sh | 1 + start.sh | 1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CloudronManifest.json b/CloudronManifest.json index 8654942..b29e4eb 100644 --- a/CloudronManifest.json +++ b/CloudronManifest.json @@ -4,7 +4,7 @@ "author": "QingWei-Li", "description": "Self hosted note taking app", "tagline": "Notea is a privacy-first, open-source note-taking application. It supports Markdown syntax, sharing, responsive and more.", - "version": "0.0.1-6", + "version": "0.0.1-9", "healthCheckPath": "/", "httpPort": 3000, "addons": { diff --git a/Dockerfile b/Dockerfile index be37a9a..031bd57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,25 @@ -FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 - -COPY --from=cinwell/notea:0.0.1 /app/ /app/code/ +FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 as builder WORKDIR /app/code +ARG NAME=main + +RUN git clone https://github.com/QingWei-Li/notea.git --branch "$NAME" --single-branch . && \ + yarn install --frozen-lockfile && \ + yarn build && \ + yarn install --production --frozen-lockfile + +FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 + +COPY --from=builder /app/code/public /app/code/public +COPY --from=builder /app/code/.next /app/code/.next +COPY --from=builder /app/code/node_modules /app/code/node_modules + COPY example.env.sh start.sh /app/code/ -RUN chmod +x /app/code/start.sh && mkdir /app/data +RUN chmod +x /app/code/start.sh + +WORKDIR /app/code EXPOSE 3000 diff --git a/example.env.sh b/example.env.sh index eff114a..4cf4472 100644 --- a/example.env.sh +++ b/example.env.sh @@ -3,4 +3,5 @@ export STORE_SECRET_KEY= export STORE_BUCKET=notea export STORE_END_POINT=http://localhost:9000 export STORE_FORCE_PATH_STYLE=true +export DISABLE_PASSWORD=true export PASSWORD= diff --git a/start.sh b/start.sh index 39b13a3..b074d89 100755 --- a/start.sh +++ b/start.sh @@ -1,6 +1,7 @@ #!/bin/bash set -eu +mkdir -p /app/data echo " => Changing ownership" chown -R cloudron:cloudron /app/data