2626
2727; An application-specific key that is required for the app to run
2828; Internally this is used for any encryption (specifically cookie encryption if enabled)
29- app_key =
29+ app_key = {{ getenv "OJS_SECRET_KEY" }}
3030
3131; Set this to On once the system has been installed
3232; (This is generally done automatically by the installer)
3333installed = Off
3434
3535; The canonical URL to the OJS installation (excluding the trailing slash)
36- base_url = "http://localhost "
36+ base_url = "{{ getenv "OJS_BASE_URL" }} "
3737
3838; Enable strict mode. This will more aggressively cause errors/warnings when
3939; deprecated behaviour exists in the codebase.
@@ -47,7 +47,7 @@ session_cookie_name = OJSSID
4747
4848; Number of days to save login cookie for if user selects to remember
4949; (set to 0 to force expiration at end of current session)
50- session_lifetime = 30
50+ session_lifetime = {{ getenv "OJS_SESSION_LIFETIME" }}
5151
5252; SameSite configuration for the cookie, see possible values and explanations
5353; at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
@@ -59,7 +59,7 @@ session_samesite = Lax
5959; time zones.
6060; I.e.: "Europe/Amsterdam"
6161; time_zone="Europe/Amsterdam"
62- time_zone = "UTC "
62+ time_zone = "{{ getenv "OJS_TIMEZONE" }} "
6363
6464; Short and long date formats
6565date_format_short = "Y-m-d"
@@ -96,13 +96,17 @@ restful_urls = On
9696; An empty string indicates that all hosts should be trusted (not recommended!)
9797; Example:
9898; allowed_hosts = '["myjournal.tld", "anotherjournal.tld", "mylibrary.tld"]'
99- allowed_hosts = '["localhost"]'
99+ {{- $url := getenv "OJS_BASE_URL" -}}
100+ {{- $cleaned := $url | replace "http://" "" | replace "https://" "" -}}
101+ {{- $host := index (split $cleaned "/") 0 -}}
102+ {{- $domain := index (split $host ":") 0 -}}
103+ allowed_hosts = '["localhost", "{{ $domain }}"]'
100104
101105; Allow the X_FORWARDED_FOR header to override the REMOTE_ADDR as the source IP
102106; Set this to "On" if you are behind a reverse proxy and you control the
103107; X_FORWARDED_FOR header.
104108; Warning: This defaults to "On" if unset for backwards compatibility.
105- trust_x_forwarded_for = Off
109+ trust_x_forwarded_for = {{ getenv "OJS_X_FORWARDED_FOR" }}
106110
107111; Display a message on the site admin and journal manager user home pages if there is an upgrade available
108112show_upgrade_warning = On
@@ -113,7 +117,7 @@ enable_minified = On
113117
114118; Provide a unique site ID and OAI base URL to PKP for statistics and security
115119; alert purposes only.
116- enable_beacon = On
120+ enable_beacon = {{ if getenv "OJS_ENABLE_BEACON" }}On{{ else }}Off{{ end }}
117121
118122; Set this to "On" if you would like to only have a single, site-wide Privacy
119123; Statement, rather than a separate Privacy Statement for each journal. Setting
@@ -139,13 +143,13 @@ sandbox = Off
139143[database]
140144
141145driver = mysqli
142- host = {{ getenv "OJS_DB_HOST" }}
143- username = {{ getenv "OJS_DB_USER" }}
144- password = {{ getenv "OJS_DB_PASSWORD" }}
145- name = {{ getenv "OJS_DB_NAME" }}
146+ host = {{ getenv "DB_HOST" }}
147+ username = {{ getenv "DB_USER" }}
148+ password = {{ getenv "DB_PASSWORD" }}
149+ name = {{ getenv "DB_NAME" }}
150+ port = {{ getenv "DB_PORT" }}
146151
147152; Set the non-standard port and/or socket, if used
148- ; port = 3306
149153; unix_socket = /var/run/mysqld/mysqld.sock
150154
151155; Database collation
@@ -208,7 +212,7 @@ connection_charset = utf8
208212; Complete path to directory to store uploaded files
209213; (This directory should not be directly web-accessible)
210214; Windows users should use forward slashes
211- files_dir = files
215+ files_dir = {{ getenv "OJS_FILES_DIR" }}
212216
213217; Path to the directory to store public uploaded files
214218; (This directory should be web-accessible and the specified path
@@ -379,14 +383,14 @@ results_per_keyword = 500
379383
380384; PDF
381385; index[application/pdf] = "/usr/bin/pstotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '"
382- ; index[application/pdf] = "/usr/bin/pdftotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '"
386+ index[application/pdf] = "/usr/bin/pdftotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '"
383387
384388; PostScript
385389; index[application/postscript] = "/usr/bin/pstotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '"
386- ; index[application/postscript] = "/usr/bin/ps2ascii %s | /usr/bin/tr '[:cntrl:]' ' '"
390+ index[application/postscript] = "/usr/bin/ps2ascii %s | /usr/bin/tr '[:cntrl:]' ' '"
387391
388392; Microsoft Word
389- ; index[application/msword] = "/usr/bin/antiword %s"
393+ index[application/msword] = "/usr/bin/antiword %s"
390394; index[application/msword] = "/usr/bin/catdoc %s"
391395
392396
@@ -401,7 +405,7 @@ oai = On
401405
402406; OAI Repository identifier. This setting forms part of OAI-PMH record IDs.
403407; Changing this setting may affect existing clients and is not recommended.
404- repository_id = ojs.pkp.sfu.ca
408+ repository_id = {{ getenv "OJS_OAI_REPOSITORY_ID" }}
405409
406410; Maximum number of records per request to serve via OAI
407411oai_max_records = 100
0 commit comments