mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
moved to test
This commit is contained in:
106
wger/Dockerfile
106
wger/Dockerfile
@@ -1,106 +0,0 @@
|
||||
#============================#
|
||||
# ALEXBELGIUM'S DOCKERFILE #
|
||||
#============================#
|
||||
# _.------.
|
||||
# _.-` ('>.-`"""-.
|
||||
# '.--'` _'` _ .--.)
|
||||
# -' '-.-';` `
|
||||
# ' - _.' ``'--.
|
||||
# '---` .-'""`
|
||||
# /`
|
||||
#=== Home Assistant Addon ===#
|
||||
|
||||
#################
|
||||
# 1 Build Image #
|
||||
#################
|
||||
|
||||
ARG BUILD_VERSION
|
||||
FROM wger/server:latest
|
||||
|
||||
##################
|
||||
# 2 Modify Image #
|
||||
##################
|
||||
|
||||
# Set S6 wait time
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=300000 \
|
||||
S6_SERVICES_GRACETIME=300000
|
||||
|
||||
VOLUME [ "/data" ]
|
||||
|
||||
USER root
|
||||
WORKDIR /home/wger/src
|
||||
|
||||
ENV FROM_EMAIL='wger Workout Manager <wger@example.com>'
|
||||
|
||||
#RUN sed -i "1a python3 manage.py migrate || true" /home/wger/entrypoint.sh \
|
||||
# && sed -i "1a ln -s $LOCATION/database.sqlite /home/wger/db" /home/wger/entrypoint.sh \
|
||||
# && sed -i "1a if [ -f /data/database.sqlite ]; then mv -f /data/database.sqlite $LOCATION/database.sqlite; fi" /home/wger/entrypoint.sh \
|
||||
# && sed -i "1a rm /home/wger/db/database.sqlite &>/dev/null || true" /home/wger/entrypoint.sh \
|
||||
# && sed -i "1a mkdir -p $LOCATION && touch $LOCATION/database.sqlite || true && chown -R wger $LOCATION || true && chmod -R 777 $LOCATION || true" /home/wger/entrypoint.sh
|
||||
|
||||
##################
|
||||
# 3 Install apps #
|
||||
##################
|
||||
|
||||
# Add rootfs
|
||||
COPY rootfs/ /
|
||||
|
||||
# Modules
|
||||
ARG MODULES="00-banner.sh"
|
||||
|
||||
# Automatic modules download
|
||||
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||
&& apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \
|
||||
&& mkdir -p /etc/cont-init.d \
|
||||
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
|
||||
&& chmod -R 755 /etc/cont-init.d || printf '%s\n' "${MODULES}" >/MODULESFILE
|
||||
|
||||
# Manual apps
|
||||
ENV PACKAGES=""
|
||||
|
||||
# Automatic apps & bashio
|
||||
RUN if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
|
||||
&& chmod 777 /automatic_packages.sh \
|
||||
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
|
||||
&& rm /automatic_packages.sh || printf '%s\n' "${PACKAGES:-}" > /ENVFILE
|
||||
|
||||
################
|
||||
# 4 Entrypoint #
|
||||
################
|
||||
|
||||
RUN chmod 777 /run.sh
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
############
|
||||
# 5 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}
|
||||
@@ -1,48 +0,0 @@
|
||||
# Addon currently broken
|
||||
# Hass.io Add-ons: Wger
|
||||
|
||||
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
[](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade)
|
||||
[](https://github.com/marketplace/actions/super-linter)
|
||||
[](https://github.com/alexbelgium/hassio-addons/actions/workflows/builder.yaml)
|
||||
|
||||
[donation-badge]: https://img.shields.io/badge/Buy%20me%20a%20coffee-%23d32f2f?logo=buy-me-a-coffee&style=flat&logoColor=white
|
||||
|
||||
_Thanks to everyone having starred my repo! To star it click on the image below, then it will be on top right. Thanks!_
|
||||
|
||||
[](https://github.com/alexbelgium/hassio-addons/stargazers)
|
||||
|
||||
## About
|
||||
|
||||
[wger](https://github.com/wger-project/wger) Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility. It offers a REST API as well, for easy integration with other projects and tools.
|
||||
|
||||
## 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
|
||||
|
||||
- Start the addon. Wait a while and check the log for any errors.
|
||||
- Open yourdomain.com:8000 (where ":8000" is the port configured in the addon).
|
||||
- Default
|
||||
- Username: `admin`
|
||||
- Password: `adminadmin`
|
||||
|
||||
## Support
|
||||
|
||||
If you have in issue with your installation, please be sure to checkout github.
|
||||
|
||||
[repository]: https://github.com/alexbelgium/hassio-addons
|
||||
@@ -1,58 +0,0 @@
|
||||
#include <tunables/global>
|
||||
|
||||
profile wger_addon flags=(attach_disconnected,mediate_deleted) {
|
||||
#include <abstractions/base>
|
||||
|
||||
capability,
|
||||
file,
|
||||
signal,
|
||||
mount,
|
||||
umount,
|
||||
remount,
|
||||
network udp,
|
||||
network tcp,
|
||||
network dgram,
|
||||
network stream,
|
||||
network inet,
|
||||
network inet6,
|
||||
network netlink raw,
|
||||
network unix dgram,
|
||||
capability setgid,
|
||||
capability setuid,
|
||||
|
||||
|
||||
# S6-Overlay
|
||||
/init ix,
|
||||
/run/{s6,s6-rc*,service}/** ix,
|
||||
/package/** ix,
|
||||
/command/** ix,
|
||||
/run/{,**} rwk,
|
||||
/dev/tty rw,
|
||||
/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,
|
||||
/dev/sda1 mrwkl,
|
||||
/dev/sdb1 mrwkl,
|
||||
/dev/nvme0 mrwkl,
|
||||
/dev/nvme1 mrwkl,
|
||||
/dev/mmcblk0p1 mrwkl,
|
||||
|
||||
# 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,
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"aarch64"
|
||||
],
|
||||
"codenotary": "alexandrep.github@gmail.com",
|
||||
"description": "manage your personal workouts, weight and diet plans",
|
||||
"environment": {
|
||||
"DJANGO_DB_DATABASE": "/data/database.sqlite"
|
||||
},
|
||||
"map": [
|
||||
"share:rw",
|
||||
"config:rw",
|
||||
"ssl:ro"
|
||||
],
|
||||
"name": "Wger",
|
||||
"ports": {
|
||||
"8000/tcp": 9927
|
||||
},
|
||||
"ports_description": {
|
||||
"8000/tcp": "Web interface"
|
||||
},
|
||||
"slug": "wger",
|
||||
"startup": "services",
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "1.9-2",
|
||||
"webui": "[PROTO:ssl]://[HOST]:[PORT:8000]"
|
||||
}
|
||||
BIN
wger/icon.png
BIN
wger/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
BIN
wger/logo.png
BIN
wger/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -1,50 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# If dockerfile failed install manually
|
||||
|
||||
##############################
|
||||
# Automatic modules download #
|
||||
##############################
|
||||
if [ -e "/MODULESFILE" ]; then
|
||||
MODULES=$(</MODULESFILE)
|
||||
MODULES="${MODULES:-00-banner.sh}"
|
||||
echo "Executing modules script : $MODULES"
|
||||
|
||||
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||
&& apt-get update && apt-get install -yqq --no-install-recommends ca-certificates || apk add --no-cache ca-certificates >/dev/null || true \
|
||||
&& mkdir -p /etc/cont-init.d \
|
||||
&& for scripts in $MODULES; do echo "$scripts" && curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/$scripts" -o /etc/cont-init.d/"$scripts" && [ "$(sed -n '/\/bin/p;q' /etc/cont-init.d/"$scripts")" != "" ] || (echo "script failed to install $scripts" && exit 1); done \
|
||||
&& chmod -R 755 /etc/cont-init.d
|
||||
fi
|
||||
|
||||
#######################
|
||||
# Automatic installer #
|
||||
#######################
|
||||
if [ -e "/ENVFILE" ]; then
|
||||
PACKAGES=$(</ENVFILE)
|
||||
echo "Executing dependency script with custom elements : $PACKAGES"
|
||||
|
||||
if ! command -v bash >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null; fi \
|
||||
&& if ! command -v curl >/dev/null 2>/dev/null; then (apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null; fi \
|
||||
&& curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh \
|
||||
&& chmod 777 /automatic_packages.sh \
|
||||
&& eval /./automatic_packages.sh "${PACKAGES:-}" \
|
||||
&& rm /automatic_packages.sh
|
||||
fi
|
||||
|
||||
if [ -e "/MODULESFILE" ] && [ ! -f /entrypoint.sh ]; then
|
||||
for scripts in $MODULES; do
|
||||
echo "$scripts : executing"
|
||||
chown "$(id -u)":"$(id -g)" /etc/cont-init.d/"$scripts"
|
||||
chmod a+x /etc/cont-init.d/"$scripts"
|
||||
/./etc/cont-init.d/"$scripts" || echo "/etc/cont-init.d/$scripts: exiting $?"
|
||||
rm /etc/cont-init.d/"$scripts"
|
||||
done | tac
|
||||
fi
|
||||
|
||||
#######################
|
||||
# Correct permissions #
|
||||
#######################
|
||||
[ -d /etc/services.d ] && chmod -R 777 /etc/services.d
|
||||
[ -d /etc/cont-init.d ] && chmod -R 777 /etc/cont-init.d
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env bashio
|
||||
|
||||
chmod +x /etc/cont-init.d/*
|
||||
sed -i "s|/usr/bin/with-contenv|/usr/bin/env|g" /etc/cont-init.d/*
|
||||
/./etc/cont-init.d/00-banner.sh
|
||||
|
||||
LOCATION=/data
|
||||
mkdir -p "$LOCATION"
|
||||
echo "Defining database"
|
||||
touch "$LOCATION"/database.sqlite
|
||||
ln -s "$LOCATION"/database.sqlite /home/wger/db
|
||||
|
||||
echo "Updating database"
|
||||
python3 manage.py migrate || true
|
||||
|
||||
echo "Defining permissions"
|
||||
chown -R wger:wger "$LOCATION"
|
||||
chown -R wger:wger "/home/wger"
|
||||
chmod -R 777 "$LOCATION"
|
||||
|
||||
echo "Launch app"
|
||||
#pip install -e . &>/dev/null
|
||||
#exec /home/wger/entrypoint.sh
|
||||
sed -i "1a cd /home/wger/src" /home/wger/entrypoint.sh
|
||||
#sed -i "s|manage.py|/home/wger/src/manage.py|g" /home/wger/entrypoint.sh
|
||||
#sed -i "s|wger bootstrap|/home/wger/src/wger bootstrap|g" /home/wger/entrypoint.sh
|
||||
su wger -c "/bin/bash /home/wger/entrypoint.sh"
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"last_update": "27-04-2022",
|
||||
"repository": "alexbelgium/hassio-addons",
|
||||
"slug": "wger",
|
||||
"source": "dockerhub",
|
||||
"upstream_repo": "wger/devel",
|
||||
"upstream_version": "1.9"
|
||||
}
|
||||
Reference in New Issue
Block a user