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
5 changes: 4 additions & 1 deletion core/files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export PHP_SESSION_CHECK_AGENT=${PHP_SESSION_CHECK_AGENT:-false}
export PHP_SESSION_COOKIE_SECURE=${PHP_SESSION_COOKIE_SECURE:-true}
export PHP_SESSION_COOKIE_DOMAIN=${PHP_SESSION_COOKIE_DOMAIN}
export PHP_SESSION_COOKIE_SAMESITE=${PHP_SESSION_COOKIE_SAMESITE:-Lax}
export PHP_TIMEZONE=${PHP_TIMEZONE:-UTC}
export PHP_TIMEZONE=${TZ:-UTC}

export NGINX_X_FORWARDED_FOR=${NGINX_X_FORWARDED_FOR:-false}
export NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM}
Expand All @@ -101,6 +101,9 @@ export SUPERVISOR_HOST=${SUPERVISOR_HOST:-127.0.0.1}
export SUPERVISOR_USERNAME=${SUPERVISOR_USERNAME:-supervisor}
export SUPERVISOR_PASSWORD=${SUPERVISOR_PASSWORD:-supervisor}

# Setting Timezone for supervisord
ln -sf /usr/share/zoneinfo/${TZ:-UTC} /etc/localtime

# Hinders further execution when sourced from other scripts
if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
return
Expand Down
2 changes: 1 addition & 1 deletion core/files/entrypoint_fpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ change_php_vars() {
sed -i "s/session.sid_length = .*/session.sid_length = 64/" "$FILE"
sed -i "s/session.use_strict_mode = .*/session.use_strict_mode = 1/" "$FILE"
echo "Configure PHP | Setting 'date.timezone = ${PHP_TIMEZONE}'"
sed -i "s/;?date.timezone = .*/date.timezone = ${PHP_TIMEZONE}/" "$FILE"
sed -i "s/;date.timezone = .*/date.timezone = ${PHP_TIMEZONE}/" "$FILE"
done

for FILE in /etc/php/*/fpm/pool.d/www.conf
Expand Down
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- "SMARTHOST_USER=${SMARTHOST_USER}"
- "SMARTHOST_PASSWORD=${SMARTHOST_PASSWORD}"
- "SMARTHOST_ALIASES=${SMARTHOST_ALIASES}"
- "TZ=${TZ:-UTC}"

redis:
image: ${REGISTRY_MIRROR_URL:-}valkey/valkey:7.2
Expand All @@ -31,6 +32,7 @@ services:
environment:
- "ENABLE_REDIS_EMPTY_PASSWORD=${ENABLE_REDIS_EMPTY_PASSWORD:-false}"
- "REDIS_PASSWORD=${REDIS_PASSWORD:-redispassword}"
- "TZ=${TZ:-UTC}"
healthcheck:
test: |
sh -c '
Expand All @@ -57,6 +59,7 @@ services:
- "MYSQL_PASSWORD=${MYSQL_PASSWORD:-example}"
- "MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}"
- "MYSQL_DATABASE=${MYSQL_DATABASE:-misp}"
- "TZ=${TZ:-UTC}"
command: "\
--innodb-buffer-pool-size=${INNODB_BUFFER_POOL_SIZE:-2048M} \
--innodb-change-buffering=${INNODB_CHANGE_BUFFERING:-none} \
Expand Down Expand Up @@ -153,6 +156,7 @@ services:
- "ADMIN_ORG_UUID=${ADMIN_ORG_UUID}"
- "GPG_PASSPHRASE=${GPG_PASSPHRASE}"
- "ATTACHMENTS_DIR=${ATTACHMENTS_DIR}"
- "TZ=${TZ:-UTC}"
# OIDC authentication settings
- "OIDC_ENABLE=${OIDC_ENABLE}"
- "OIDC_PROVIDER_URL=${OIDC_PROVIDER_URL}"
Expand Down Expand Up @@ -304,7 +308,7 @@ services:
- "PHP_SESSION_COOKIE_SECURE=${PHP_SESSION_COOKIE_SECURE:-true}"
- "PHP_SESSION_COOKIE_DOMAIN=${PHP_SESSION_COOKIE_DOMAIN}"
- "PHP_SESSION_COOKIE_SAMESITE=${PHP_SESSION_COOKIE_SAMESITE:-Lax}"
- "PHP_TIMEZONE=${PHP_TIMEZONE:-UTC}"
- "PHP_TIMEZONE=${TZ:-UTC}"
# security settings
- "HSTS_MAX_AGE=${HSTS_MAX_AGE}"
- "X_FRAME_OPTIONS=${X_FRAME_OPTIONS}"
Expand Down Expand Up @@ -334,6 +338,8 @@ services:
- "./custom/expansion/:/custom/expansion/:Z"
- "./custom/export_mod/:/custom/export_mod/:Z"
- "./custom/import_mod/:/custom/import_mod/:Z"
environment:
- "TZ=${TZ:-UTC}"

misp-guard:
profiles:
Expand All @@ -352,6 +358,7 @@ services:
environment:
- "GUARD_PORT=${GUARD_PORT:-8888}"
- "GUARD_ARGS=${GUARD_ARGS}"
- "TZ=${TZ:-UTC}"
volumes:
- ./guard/config.json:/config.json:ro
- misp_guard_ca:/misp_guard_ca
Expand Down
3 changes: 3 additions & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ ENABLE_BACKGROUND_UPDATES=
# use a different attachments_dir. defaults to /var/www/MISP/app/files
ATTACHMENTS_DIR=

# Setting the timezone (UTC, CET, Europe/Berlin etc.). Default is UTC.
# TZ="UTC"

# By default, a daily synchronization is performed, but you can modify this by changing the push and pull frequency (in seconds).
# CRON_PULLALL="86400"
# CRON_PUSHALL="86400"
Expand Down