Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bin/homecloud-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ if [ -n "${EXTRA_COMPOSE_FILE}" ]; then
PROFILES=" -f ${SERVICE_DESTINATION}/${EXTRA_COMPOSE_FILE} ${PROFILES}"
fi

if [ "${SYSLOG_ENABLED}" == "yes" ]; then
PROFILES=" -f ${SERVICE_DESTINATION}/${SYSLOG_COMPOSE_FILE} ${PROFILES}"
fi

DOCKER_CMD=$(which docker||true)
DOCKER_COMPOSE_CMD=$(which docker-compose||true)
EXECUTOR_CMD=""
Expand Down
1 change: 1 addition & 0 deletions deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ done

echo -e "${colors[Green]} - HomeCloud service major docker compose file ${colors[Blue]}${SERVICE_DESTINATION}/docker-compose.yml ${colors[Color_Off]}"
rsync -a "${HOMECLOUD_REPOS_PATH}/docker-compose.yml" "${SERVICE_DESTINATION}/docker-compose.yml"
rsync -a "${HOMECLOUD_REPOS_PATH}/docker-compose.syslog.yml" "${SERVICE_DESTINATION}/docker-compose.syslog.yml"

# Core Services
CORESERVICES_APP_FOLDERS=("lb" "lb/conf.d" "lb/certs" "lb/webroot" "mariadb" "postgres" "redis" "authentik/media" "authentik/templates" "authentik/certs" "authentik/extra" "authentik/data" "authentik/dist" "nextcloud" "nextcloud-app" "nextcloud-web" "elasticsearch")
Expand Down
66 changes: 66 additions & 0 deletions docker-compose.syslog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
services:
lb:
logging:
driver: syslog
options:
tag: homecloud_lb

mariadb:
logging:
driver: syslog
options:
tag: homecloud_mariadb

postgres:
logging:
driver: syslog
options:
tag: homecloud_postgres

redis:
logging:
driver: syslog
options:
tag: homecloud_redis

authentikapp:
logging:
driver: syslog
options:
tag: homecloud_authentikapp

authentikworker:
logging:
driver: syslog
options:
tag: homecloud_authentikworker

nextcloudapp:
logging:
driver: syslog
options:
tag: homecloud_nextcloudapp

nextcloudweb:
logging:
driver: syslog
options:
tag: homecloud_nextcloudweb

nextcloudcron:
logging:
driver: syslog
options:
tag: homecloud_nextcloudcron

imaginary:
logging:
driver: syslog
options:
tag: homecloud_imaginary

elasticsearch:
logging:
driver: syslog
options:
tag: homecloud_elasticsearch
6 changes: 6 additions & 0 deletions etc/logrotate.d/homecloud-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/var/log/containers/*.log {
rotate 14
daily
missingok
compress
}
9 changes: 9 additions & 0 deletions etc/rsyslog.d/40-homecloud.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$FileCreateMode 0644
template(
name="HomecloudLog"
type="string"
string="/var/log/homecloud/%programname%.log"
)

if $programname startswith 'homecloud_' then ?HomecloudLog
& ~
4 changes: 4 additions & 0 deletions homecloud.env
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@ JELLYFIN_PRIVATE_KEY_FILE=""
# Maintenance configurations
ALERT_EMAIL= # An email to send alert messages

# Enable syslog driver
SYSLOG_ENABLED="no"
SYSLOG_COMPOSE_FILE="docker-compose.syslog.yml"

# vim: filetype=bash