fix: ensure script properly configures Traefik and Authelia
- Move Traefik traefik.yml to config/ directory for correct Docker mounting - Remove invalid session.cookies section from Authelia template and config processing - Ensure all configuration files are placed in correct locations for Docker containers - Prevent configuration validation errors that cause service restarts
This commit is contained in:
@@ -64,11 +64,6 @@ session:
|
||||
inactivity: 24h # Session expires after 24 hours of inactivity
|
||||
remember_me_duration: 1M
|
||||
domain: ${DOMAIN}
|
||||
cookies:
|
||||
- name: authelia_session
|
||||
domain: ${DOMAIN}
|
||||
secure: true
|
||||
same_site: lax
|
||||
|
||||
regulation:
|
||||
max_retries: 3
|
||||
|
||||
@@ -767,6 +767,11 @@ deploy_core() {
|
||||
cp -r "$REPO_DIR/config-templates/traefik" /opt/stacks/core/
|
||||
sudo chown -R "$ACTUAL_USER:$ACTUAL_USER" /opt/stacks/core/traefik
|
||||
|
||||
# Move Traefik config file to the correct location for Docker mount
|
||||
debug_log "Moving Traefik config file to config directory"
|
||||
mkdir -p /opt/stacks/core/traefik/config
|
||||
mv /opt/stacks/core/traefik/traefik.yml /opt/stacks/core/traefik/config/
|
||||
|
||||
# Only copy external host files on core server (where Traefik runs)
|
||||
if [ "$DEPLOY_CORE" = true ]; then
|
||||
log_info "Core server detected - copying external host routing files"
|
||||
@@ -813,6 +818,10 @@ deploy_core() {
|
||||
replace_env_placeholders "$config_file" true
|
||||
done
|
||||
|
||||
# Remove invalid session.cookies section from Authelia config (not supported in v4.37.5)
|
||||
debug_log "Removing invalid session.cookies section from Authelia config"
|
||||
sed -i '/^ cookies:/,/^$/d' /opt/stacks/core/authelia/configuration.yml
|
||||
|
||||
# Move config files to the correct location for Docker mount
|
||||
debug_log "Moving Authelia config files to config directory"
|
||||
mkdir -p /opt/stacks/core/authelia/config
|
||||
|
||||
Reference in New Issue
Block a user