mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Joplin initial addition
This commit is contained in:
1
joplin/CHANGELOG.md
Normal file
1
joplin/CHANGELOG.md
Normal file
@@ -0,0 +1 @@
|
||||
- Initial release
|
||||
77
joplin/Dockerfile
Normal file
77
joplin/Dockerfile
Normal file
@@ -0,0 +1,77 @@
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_VERSION
|
||||
FROM florider89/joplin-server:latest
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
ARG BASHIO_VERSION=0.13.1
|
||||
|
||||
RUN \
|
||||
################
|
||||
# Install apps #
|
||||
################
|
||||
apt-get clean \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y \
|
||||
jq \
|
||||
curl \
|
||||
\
|
||||
##################
|
||||
# Install bashio #
|
||||
##################
|
||||
&& mkdir -p /tmp/bashio \
|
||||
&& curl -L -f -s "https://github.com/hassio-addons/bashio/archive/v${BASHIO_VERSION}.tar.gz" \
|
||||
| tar -xzf - --strip 1 -C /tmp/bashio \
|
||||
&& mv /tmp/bashio/lib /usr/lib/bashio \
|
||||
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio \
|
||||
&& rm -rf /tmp/bashio \
|
||||
\
|
||||
/var/{cache,log}/* \
|
||||
/var/lib/apt/lists/* \
|
||||
\
|
||||
###################
|
||||
# Configure image #
|
||||
###################
|
||||
\
|
||||
# Create directories
|
||||
&& mkdir -m 777 -p \
|
||||
/data/photoprism/originals \
|
||||
/data/photoprism/import \
|
||||
/data/photoprism/storage/config \
|
||||
/data/photoprism/backup \
|
||||
/data/photoprism/storage/cache && \
|
||||
chown -Rf photoprism:photoprism /data/photoprism && \
|
||||
chmod -Rf a+rwx /data/photoprism \
|
||||
# Allow execution of run
|
||||
&& chmod 777 /run.sh
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/env" ]
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
### LABELS
|
||||
ARG BUILD_ARCH
|
||||
ARG BUILD_DATE
|
||||
ARG BUILD_DESCRIPTION
|
||||
ARG BUILD_NAME
|
||||
ARG BUILD_REF
|
||||
ARG BUILD_REPOSITORY
|
||||
ARG BUILD_VERSION
|
||||
LABEL \
|
||||
io.hass.name="${BUILD_NAME}" \
|
||||
io.hass.description="${BUILD_DESCRIPTION}" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION} \
|
||||
maintainer="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.title="${BUILD_NAME}" \
|
||||
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
|
||||
org.opencontainers.image.vendor="Home Assistant Add-ons" \
|
||||
org.opencontainers.image.authors="alexbelgium (https://github.com/alexbelgium)" \
|
||||
org.opencontainers.image.licenses="MIT" \
|
||||
org.opencontainers.image.url="https://github.com/alexbelgium" \
|
||||
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
|
||||
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
|
||||
org.opencontainers.image.created=${BUILD_DATE} \
|
||||
org.opencontainers.image.revision=${BUILD_REF} \
|
||||
org.opencontainers.image.version=${BUILD_VERSION}
|
||||
45
joplin/README.md
Normal file
45
joplin/README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Home assistant add-on: Joplin
|
||||
|
||||
![Supports aarch64 Architecture][aarch64-shield] ![Supports amd64 Architecture][amd64-shield] ![Supports armhf Architecture][armhf-shield] ![Supports armv7 Architecture][armv7-shield]
|
||||
|
||||
## About
|
||||
|
||||
Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks.
|
||||
|
||||
Project homepage : https://github.com/laurent22/joplin
|
||||
|
||||
Based on the docker image : https://hub.docker.com/r/florider89/joplin-server
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in
|
||||
comparison to installing any other Hass.io add-on.
|
||||
|
||||
1. [Add my Hass.io add-ons repository][repository] to your Hass.io instance.
|
||||
1. Install this add-on.
|
||||
1. Click the `Save` button to store your configuration.
|
||||
1. Start the add-on.
|
||||
1. Check the logs of the add-on to see if everything went well.
|
||||
1. Carefully configure the add-on to your preferences, see the official documentation for for that.
|
||||
|
||||
## Configuration
|
||||
|
||||
Webui can be found at <http://your-ip:port>
|
||||
|
||||
```yaml
|
||||
APP_BASE_URL: This is the base public URL where the service will be running. For example, if you want it to run from https://example.com/joplin, this is what you should set the URL to. The base URL can include the port.
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
Create an issue on github
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
[smb-shield]: https://img.shields.io/badge/smb-yes-green.svg
|
||||
[openvpn-shield]: https://img.shields.io/badge/openvpn-yes-green.svg
|
||||
[ingress-shield]: https://img.shields.io/badge/ingress-yes-green.svg
|
||||
[ssl-shield]: https://img.shields.io/badge/ssl-yes-green.svg
|
||||
[aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg
|
||||
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
|
||||
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
|
||||
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
|
||||
49
joplin/apparmor.txt
Normal file
49
joplin/apparmor.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile joplin flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
capability,
|
||||
file,
|
||||
mount,
|
||||
umount,
|
||||
remount,
|
||||
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
capability sys_admin,
|
||||
capability dac_read_search,
|
||||
capability dac_override,
|
||||
capability sys_rawio,
|
||||
|
||||
# S6-Overlay
|
||||
/bin/** ix,
|
||||
/usr/bin/** ix,
|
||||
/usr/lib/bashio/** ix,
|
||||
/etc/s6/** rix,
|
||||
/run/s6/** rix,
|
||||
/etc/services.d/** rwix,
|
||||
/etc/cont-init.d/** rwix,
|
||||
/etc/cont-finish.d/** rwix,
|
||||
/init rix,
|
||||
/var/run/** mrwkl,
|
||||
/var/run/ mrwkl,
|
||||
/dev/i2c-1 mrwkl,
|
||||
# Files required
|
||||
/dev/sda1 mrwkl,
|
||||
/dev/sdb1 mrwkl,
|
||||
/dev/mmcblk0p1 mrwkl,
|
||||
/dev/ttyUSB0 mrwkl,
|
||||
/dev/* mrwkl,
|
||||
/tmp/** mrkwl,
|
||||
|
||||
# Data access
|
||||
/data/** rw,
|
||||
|
||||
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
|
||||
ptrace (trace,read) peer=docker-default,
|
||||
|
||||
# docker daemon confinement requires explict allow rule for signal
|
||||
signal (receive) set=(kill,term) peer=/usr/bin/docker,
|
||||
|
||||
}
|
||||
25
joplin/config.json
Normal file
25
joplin/config.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "Joplin",
|
||||
"version": "2.3.5",
|
||||
"slug": "joplin",
|
||||
"description": "Self-hosted open source note-taking application",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"webui": "http://[HOST]:[PORT:22300]",
|
||||
"ports": {
|
||||
"22300/tcp": 22300
|
||||
},
|
||||
"apparmor": "true",
|
||||
"ports_description": {
|
||||
"22300/tcp": "Web interface"
|
||||
},
|
||||
"environment": {
|
||||
"APP_PORT": "22300"
|
||||
},
|
||||
"options": {
|
||||
"APP_BASE_URL": "your_domain"
|
||||
},
|
||||
"schema": {
|
||||
"APP_BASE_URL": "str"
|
||||
},
|
||||
"arch": ["aarch64", "amd64", "armhf", "armv7"]
|
||||
}
|
||||
BIN
joplin/icon.png
Normal file
BIN
joplin/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
BIN
joplin/logo.png
Normal file
BIN
joplin/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
49
joplin/rootfs/run.sh
Normal file
49
joplin/rootfs/run.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bashio
|
||||
|
||||
##########
|
||||
# BANNER #
|
||||
##########
|
||||
|
||||
if bashio::supervisor.ping; then
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue " Add-on: $(bashio::addon.name)"
|
||||
bashio::log.blue " $(bashio::addon.description)"
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
|
||||
bashio::log.blue " Add-on version: $(bashio::addon.version)"
|
||||
if bashio::var.true "$(bashio::addon.update_available)"; then
|
||||
bashio::log.magenta ' There is an update available for this add-on!'
|
||||
bashio::log.magenta \
|
||||
" Latest add-on version: $(bashio::addon.version_latest)"
|
||||
bashio::log.magenta ' Please consider upgrading as soon as possible.'
|
||||
else
|
||||
bashio::log.green ' You are running the latest version of this add-on.'
|
||||
fi
|
||||
|
||||
bashio::log.blue " System: $(bashio::info.operating_system)" \
|
||||
" ($(bashio::info.arch) / $(bashio::info.machine))"
|
||||
bashio::log.blue " Home Assistant Core: $(bashio::info.homeassistant)"
|
||||
bashio::log.blue " Home Assistant Supervisor: $(bashio::info.supervisor)"
|
||||
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
bashio::log.blue \
|
||||
' Please, share the above information when looking for help'
|
||||
bashio::log.blue \
|
||||
' or support in, e.g., GitHub, forums or the Discord chat.'
|
||||
bashio::log.green \
|
||||
' https://github.com/alexbelgium/hassio-addons'
|
||||
bashio::log.blue \
|
||||
'-----------------------------------------------------------'
|
||||
fi
|
||||
|
||||
##############
|
||||
# LAUNCH APP #
|
||||
##############
|
||||
|
||||
# Configure app
|
||||
export APP_BASE_URL=$(bashio::config 'APP_BASE_URL')
|
||||
bashio::log.info 'Starting Joplin'
|
||||
npm --prefix packages/server start
|
||||
Reference in New Issue
Block a user