This commit is contained in:
alexbelgium
2025-06-01 19:39:59 +02:00
parent 72ec59489e
commit 1a8a0831df
4 changed files with 30 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
## 16.0-4 (01-06-2025)
- BREAKING CHANGE : now options must be configured from the addon options : OPENPROJECT_SECRET_KEY_BASE ; OPENPROJECT_HOST__NAME ; OPENPROJECT_HTTPS ; OPENPROJECT_DEFAULT__LANGUAGE
- BREAKING CHANGE : enable config.yaml for additional environment variables
- BREAKING CHANGE : moved files to /config instead of /data to be able to see them
- Add persistence for data attachements
## 16.0-3 (01-06-2025)
- Minor bugs fixed

View File

@@ -27,27 +27,14 @@ ENV S6_CMD_WAIT_FOR_SERVICES=1 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_SERVICES_GRACETIME=0
ENV OPENPROJECT_SECRET_KEY_BASE=addon_secret \
OPENPROJECT_HOST__NAME=localhost:8080 \
OPENPROJECT_HTTPS=false \
OPENPROJECT_DEFAULT__LANGUAGE=en \
OPENPROJECT_EDITION=bim \
PGDATA=/data/pg\
APP_DATA_PATH=/data/assets
USER root
# hadolint ignore=SC2154
RUN sed -i "s|/bin/bash|/bin/bashio|g" /app/docker/prod/entrypoint.sh && \
sed -i "1a /./ha_entrypoint.sh" /app/docker/prod/entrypoint.sh && \
sed -i "2a\for variable in OPENPROJECT_SECRET_KEY_BASE OPENPROJECT_HOST__NAME OPENPROJECT_HTTPS OPENPROJECT_DEFAULT__LANGUAGE; do if bashio::config.has_value \$variable; then export \$variable=\"\$(bashio::config $variable)\"; fi; done" /app/docker/prod/entrypoint.sh
##################
# 3 Install apps #
##################
# Copy local files
# COPY rootfs/ /
COPY rootfs/ /
# Uses /bin for compatibility purposes
# hadolint ignore=DL4005
@@ -82,7 +69,8 @@ ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templat
ADD "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint_modif.sh" "/ha_entrypoint_modif.sh"
RUN chmod 777 /ha_entrypoint.sh /ha_entrypoint_modif.sh && /ha_entrypoint_modif.sh && rm /ha_entrypoint_modif.sh
# ENTRYPOINT [ "/ha_entrypoint.sh" ]
ENTRYPOINT [ "/usr/bin/env" ]
CMD [ "/ha_entrypoint.sh" ]
############
# 5 Labels #

View File

@@ -5,6 +5,13 @@
],
"codenotary": "alexandrep.github@gmail.com",
"description": "Openproject for Home Assistant",
"environment": {
"OPENPROJECT_SECRET_KEY_BASE": "addon_secret",
"OPENPROJECT_EDITION": "bim",
"PGDATA": "/config/pg",
"APP_DATA_PATH": "/config/assets",
"OPENPROJECT_ATTACHMENTS__STORAGE__PATH": "/config/files"
},
"image": "ghcr.io/alexbelgium/openproject-{arch}",
"init": false,
"map": [
@@ -32,6 +39,6 @@
"slug": "openproject",
"udev": true,
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/openproject",
"version": "16.0-4",
"version": "16.0-5",
"webui": "[PROTO:ssl]://[HOST]:[PORT:8080]"
}

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bashio
bashio::log.info "Starting OpenProject"
for folders in pg assets; do
mkdir -p /config/"$folders"/
if [ -d /data/"$folders" ]; then
bashio::log.warning "Migrating /data/$folders to /config/$folders"
cp -rf /data/"$folders"/ /config/"$folders"/
rm -r /data/"$folders"
fi
done
cd /app || true
exec ./docker/prod/entrypoint.sh ./docker/prod/supervisord