Skip to content

Commit 5689821

Browse files
committed
Fixup config
1 parent df91083 commit 5689821

5 files changed

Lines changed: 14 additions & 15 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ ENV \
7070
OJS_ENABLE_BEACON=1 \
7171
OJS_SESSION_LIFETIME=30 \
7272
OJS_X_FORWARDED_FOR=Off \
73+
OJS_SMTP_SERVER= \
74+
OJS_SMTP_PORT=25 \
7375
# see https://github.com/Islandora-Devops/isle-buildkit/tree/main/nginx#nginx-settings
7476
PHP_MAX_EXECUTION_TIME=300 \
7577
PHP_MAX_INPUT_TIME=300 \

docker-compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ services:
3535
ports:
3636
- 80:80
3737
environment:
38-
OJS_OAI_REPOSITORY_ID: ojs.localhost
38+
OJS_OAI_REPOSITORY_ID: ${DOMAIN:-localhost}
3939
OJS_ENABLE_BEACON: 1
40+
OJS_SMTP_SERVER: ${OJS_SMTP_SERVER:-}
4041
secrets:
4142
- source: DB_ROOT_PASSWORD
4243
- source: OJS_API_KEY_SECRET

rootfs/etc/confd/templates/config.inc.tmpl

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -304,19 +304,15 @@ allowed_title_html = "b,i,u,sup,sub"
304304

305305
[email]
306306

307-
; Default method to send emails
308-
; Available options: sendmail, smtp, log, phpmailer
307+
{{ if getenv "OJS_SMTP_SERVER" }}
308+
default = smtp
309+
smtp = On
310+
smtp_server = {{ getenv "OJS_SMTP_SERVER" }}
311+
smtp_port = {{ getenv "OJS_SMTP_PORT" }}
312+
{{ else }}
309313
default = sendmail
310-
311-
; Path to the sendmail, -bs argument is for using SMTP protocol
312314
sendmail_path = "/usr/sbin/sendmail -bs"
313-
314-
; Use SMTP for sending mail instead of mail()
315-
; smtp = On
316-
317-
; SMTP server settings
318-
; smtp_server = mail.example.com
319-
; smtp_port = 25
315+
{{ end }}
320316

321317
; Enable SMTP authentication
322318
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
@@ -358,7 +354,7 @@ sendmail_path = "/usr/sbin/sendmail -bs"
358354
; dmarc_compliant_from_displayname = '%n via %s'
359355

360356
; If enabled, email addresses must be validated before login is possible.
361-
require_validation = Off
357+
require_validation = On
362358

363359
; The number of days a user has to validate their account before their access key expires.
364360
validation_timeout = 14

rootfs/etc/nginx/shared/ojs.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ location ~ \.php(/|$) {
2626
}
2727

2828
fastcgi_pass unix:/var/run/php-fpm83/php-fpm83.sock;
29-
29+
fastcgi_param HTTPS on;
30+
fastcgi_param HTTP_SCHEME https;
3031
fastcgi_index index.php;
3132
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
3233
fastcgi_param PATH_INFO $fastcgi_path_info;

scripts/generate-secrets.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ yq -r '.secrets[].file' docker-compose.yaml | uniq | while read -r SECRET; do
1616
(grep -ao "${CHARACTERS}" < /dev/urandom || true) | head "-${LENGTH}" | tr -d '\n' > "${SECRET}"
1717
fi
1818
done
19-

0 commit comments

Comments
 (0)