diff --git a/CloudronManifest.json b/CloudronManifest.json new file mode 100644 index 0000000..8654942 --- /dev/null +++ b/CloudronManifest.json @@ -0,0 +1,27 @@ +{ + "id": "com.notea.cloudronapp", + "title": "Notea", + "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", + "healthCheckPath": "/", + "httpPort": 3000, + "addons": { + "localstorage": {}, + "proxyAuth": {} + }, + "optionalSso": true, + "memoryLimit": 1610612736, + "manifestVersion": 2, + "website": "https://cinwell.com/notea/", + "contactEmail": "support@clourdon.io", + "icon": "", + "tags": [ "note taking", "markdown" ], + "mediaLinks": [], + "postInstallMessage": "good luck", + "minBoxVersion": "5.3.0", + "documentationUrl": "https://github.com/QingWei-Li/notea#quickstart", + "forumUrl": "https://forum.cloudron.io/topic/5011/notea?_=1620158318691", + "changelog": "Build from source" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be37a9a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 + +COPY --from=cinwell/notea:0.0.1 /app/ /app/code/ + +WORKDIR /app/code + +COPY example.env.sh start.sh /app/code/ + +RUN chmod +x /app/code/start.sh && mkdir /app/data + +EXPOSE 3000 + +CMD ["/app/code/start.sh"] + diff --git a/example.env.sh b/example.env.sh new file mode 100644 index 0000000..eff114a --- /dev/null +++ b/example.env.sh @@ -0,0 +1,6 @@ +export STORE_ACCESS_KEY= +export STORE_SECRET_KEY= +export STORE_BUCKET=notea +export STORE_END_POINT=http://localhost:9000 +export STORE_FORCE_PATH_STYLE=true +export PASSWORD= diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..39b13a3 --- /dev/null +++ b/start.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -eu + +echo " => Changing ownership" +chown -R cloudron:cloudron /app/data + +if [ ! -f /app/data/env.sh ] ; then + echo " => Use terminal to customize config in /app/data/env.sh" + cp /app/code/example.env.sh /app/data/env.sh +fi + +echo " => Sourcing config" +source /app/data/env.sh + +echo " => Starting notea" +exec /usr/local/bin/gosu cloudron:cloudron /app/code/node_modules/.bin/next start +