mirror of
https://github.com/friendica/docker
synced 2026-04-13 04:17:46 +02:00
Adding logfile at startup
This commit is contained in:
parent
c880649dfa
commit
0435c37e43
32 changed files with 49 additions and 102 deletions
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -170,6 +169,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -139,6 +139,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -162,6 +161,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -170,6 +169,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -139,6 +139,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -162,6 +161,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -170,6 +169,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -139,6 +139,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -162,6 +161,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $config = [
|
|||
// Necessary because otherwise the daemon isn't working
|
||||
'pidfile' => '/var/run/friendica.pid',
|
||||
|
||||
'logfile' => '/var/www/html/friendica.log',
|
||||
'logfile' => '/var/log/friendica.log',
|
||||
'loglevel' => 'notice',
|
||||
],
|
||||
'storage' => [
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
|
|
@ -137,6 +137,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ RUN set -ex; \
|
|||
\
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
sudo \
|
||||
rsync \
|
||||
bzip2 \
|
||||
# For mail() support
|
||||
|
|
@ -160,6 +159,9 @@ RUN set -ex; \
|
|||
mkdir -p -m 775 /var/www/data; \
|
||||
chown -R www-data:www-data /var/www/data
|
||||
|
||||
RUN set -ex; \
|
||||
ln -sf /dev/stdout /var/log/friendica.log
|
||||
|
||||
VOLUME /var/www/html
|
||||
VOLUME /var/www/data
|
||||
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -75,11 +75,6 @@ There are two options to enable background tasks for Friendica:
|
|||
**Friendica Logging**
|
||||
|
||||
- `FRIENDICA_DEBUGGING` If set to `true`, the logging of Friendica is enabled.
|
||||
- `FRIENDICA_LOGFILE` (optional) The path to the logfile (Default: /var/www/friendica.log).
|
||||
- `FRIENDICA_LOGLEVEL` (optional) The loglevel to log (Default: notice).
|
||||
- `FRIENDICA_LOGGER` (optional) Set the type - stream, syslog, monolog (Default: stream).
|
||||
- `FRIENDICA_SYSLOG_FLAGS` (optional) In case syslog is used, set the corresponding flags (Default: `LOG_PID | LOG_ODELAY | LOG_CONS | LOG_PERROR`).
|
||||
- `FRIENDICA_SYSLOG_FACTORY` (optional) In case syslog is used, set the corresponding factory (Default: `LOG_USER`).
|
||||
|
||||
**Database** (**required at installation**)
|
||||
|
||||
|
|
@ -107,6 +102,12 @@ Note that you may have to change other limits depending on your client, webserve
|
|||
|
||||
Because Friendica links the administrator account to a specific mail address, you **have** to set a valid address for `MAILNAME`.
|
||||
|
||||
## Logging settings
|
||||
|
||||
Friendica logs to /var/log/friendica.log by default. This location inside the container should not be changed (and the corresponding setting
|
||||
in Friendica is disabled). The output of /var/log/friendica.log is available in the Docker log of the container (see Docker logging for
|
||||
details). If you prefer you can still mount a file to /var/log/friendica.log into the container.
|
||||
|
||||
## Mail settings
|
||||
|
||||
The binary `msmtp` is used for the mail support of Friendica.
|
||||
|
|
|
|||
|
|
@ -39,16 +39,8 @@ file_env() {
|
|||
unset "$fileVar"
|
||||
}
|
||||
|
||||
# initialize the email configuration
|
||||
sh /setup_msmtp.sh
|
||||
|
||||
# ensure we have a logfile writeable by www-data
|
||||
FRIENDICA_LOGFILE=${FRIENDICA_LOGFILE:-/var/www/html/friendica.log}
|
||||
if sudo -u www-data test -w "$(dirname "$FRIENDICA_LOGFILE")"; then
|
||||
touch "$FRIENDICA_LOGFILE"
|
||||
chown www-data:www-data "$FRIENDICA_LOGFILE"
|
||||
fi
|
||||
|
||||
# just check if we execute apache or php-fpm
|
||||
if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then
|
||||
if [ -n "${REDIS_HOST+x}" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue