Compare commits

...

2 Commits

Author SHA1 Message Date
3wc a4c412bc2a Config tidying for new version
continuous-integration/drone/push Build is passing Details
2024-02-10 20:23:40 -03:00
3wc 724410ec71 New Selfoss image & version 2024-01-21 00:06:41 -03:00
5 changed files with 17 additions and 38 deletions

View File

@ -15,8 +15,7 @@ SELFOSS_DB_TYPE=sqlite
# Set these two variables to enable authentication # Set these two variables to enable authentication
SELFOSS_USERNAME= SELFOSS_USERNAME=
SELFOSS_PASSWORD= SELFOSS_PASSWORD=
# The recommended /password hash script currently seems broken; use this instead: # Visit /password on your instance to generate a password hash
# http://www.passwordtool.hu/php5-password-hash-generator
# Options are EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, None # Options are EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, None
SELFOSS_LOGGER_LEVEL=ERROR SELFOSS_LOGGER_LEVEL=ERROR

View File

@ -7,7 +7,7 @@
<!-- metadata --> <!-- metadata -->
* **Category**: Apps * **Category**: Apps
* **Status**: 1, alpha * **Status**: 1, alpha
* **Image**: [`akito13/selfoss`](https://hub.docker.com/r/akito13/selfoss), 2, 3rd-party * **Image**: [`rsprta/selfoss`](https://hub.docker.com/r/rsprta/selfoss), 2, 3rd-party
* **Healthcheck**: Yes * **Healthcheck**: Yes
* **Backups**: No * **Backups**: No
* **Email**: No * **Email**: No

View File

@ -1 +1 @@
export ENTRYPOINT_CONF_VERSION=v7 export ENTRYPOINT_CONF_VERSION=v9

View File

@ -1,7 +1,7 @@
version: '3.8' version: '3.8'
services: services:
app: app:
image: akito13/selfoss:0.2.0 image: rsprta/selfoss:2.19
volumes: volumes:
- selfoss:/selfoss/data - selfoss:/selfoss/data
environment: environment:
@ -13,9 +13,11 @@ services:
- SELFOSS_DB_TYPE - SELFOSS_DB_TYPE
- SELFOSS_LOGGER_LEVEL - SELFOSS_LOGGER_LEVEL
# Not working yet :/ # Not working yet :/
#- SELFOSS_WALLABAG - SELFOSS_WALLABAG
#- SELFOSS_WALLABAG_VERSION - SELFOSS_WALLABAG_VERSION
- SELFOSS_MASTODON
- SELFOSS_SHARE - SELFOSS_SHARE
- SELFOSS_BASE_URL=https://${DOMAIN}/
#secrets: #secrets:
# TODO 3wc: see above note about issue #3 # TODO 3wc: see above note about issue #3
#- selfoss_password #- selfoss_password

View File

@ -1,46 +1,24 @@
#!/usr/bin/env bash #!/usr/bin/env sh
configure_php() { configure_php() {
# 3wc: these changes allow environment variables to propagate to PHP; Selfoss # 3wc: these changes allow environment variables to propagate to PHP; Selfoss
# already loads its config from environment variables but unless we make these # already loads its config from environment variables but unless we make these
# changes, it can't access them. See # changes, it can't access them. See
# https://github.com/docker-library/php/pull/93/files # https://github.com/docker-library/php/pull/93/files
if ! grep -q '^clear_env = no' /etc/php7/php-fpm.d/www.conf; then if ! grep -q '^clear_env = no' /etc/php8/php-fpm.d/www.conf; then
sed -i 's/;clear_env = no/clear_env = no/' /etc/php7/php-fpm.d/www.conf sed -i 's/;clear_env = no/clear_env = no/' /etc/php8/php-fpm.d/www.conf
fi fi
if ! grep -q '^clear_env = no' /etc/php7/php-fpm.conf; then if ! grep -q '^clear_env = no' /etc/php8/php-fpm.conf; then
echo 'clear_env = no' >> /etc/php7/php-fpm.conf echo 'clear_env = no' >> /etc/php8/php-fpm.conf
fi fi
if ! grep -q 'variables_order = "EGPCS"' /etc/php7/php.ini; then if ! grep -q 'variables_order = "EGPCS"' /etc/php8/php.ini; then
sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' \ sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' \
/etc/php7/php.ini /etc/php8/php.ini
fi fi
} }
file_env() {
# 3wc: Load $VAR_FILE into $VAR - useful for secrets. See
# https://medium.com/@adrian.gheorghe.dev/using-docker-secrets-in-your-environment-variables-7a0609659aab
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
load_vars() { load_vars() {
file_env "SELFOSS_PASSWORD" #export SELFOSS_PASSWORD=$(cat $SELFOSS_PASSWORD_FILE)
file_env "SELFOSS_DB_PASSWORD" export SELFOSS_DB_PASSWORD=$(cat $SELFOSS_DB_PASSWORD_FILE)
} }
main() { main() {