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,21 @@ 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+
101+ {{- $temp := replace $url " https://" " " -1 -}}
102+ {{- $cleaned := replace $temp " http://" " " -1 -}}
103+
104+ {{- $host := index (split $cleaned " /" ) 0 -}}
105+ {{- $domain := index (split $host " :" ) 0 -}}
106+ allowed_hosts = '[" localhost" , " {{ $domain }}" ]'
107+
100108
101109; Allow the X_FORWARDED_FOR header to override the REMOTE_ADDR as the source IP
102110; Set this to " On" if you are behind a reverse proxy and you control the
103111; X_FORWARDED_FOR header.
104112; Warning: This defaults to " On" if unset for backwards compatibility.
105- trust_x_forwarded_for = Off
113+ trust_x_forwarded_for = {{ getenv " OJS_X_FORWARDED_FOR " }}
106114
107115; Display a message on the site admin and journal manager user home pages if there is an upgrade available
108116show_upgrade_warning = On
@@ -113,7 +121,7 @@ enable_minified = On
113121
114122; Provide a unique site ID and OAI base URL to PKP for statistics and security
115123; alert purposes only.
116- enable_beacon = On
124+ enable_beacon = {{ if getenv " OJS_ENABLE_BEACON " }}On{{ else }}Off{{ end }}
117125
118126; Set this to " On" if you would like to only have a single, site-wide Privacy
119127; Statement, rather than a separate Privacy Statement for each journal. Setting
@@ -139,13 +147,13 @@ sandbox = Off
139147[database]
140148
141149driver = 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" }}
150+ host = {{ getenv " DB_HOST" }}
151+ username = {{ getenv " DB_USER" }}
152+ password = {{ getenv " DB_PASSWORD" }}
153+ name = {{ getenv " DB_NAME" }}
154+ port = {{ getenv " DB_PORT" }}
146155
147156; Set the non-standard port and /or socket, if used
148- ; port = 3306
149157; unix_socket = /var/run/mysqld/mysqld.sock
150158
151159; Database collation
@@ -208,7 +216,7 @@ connection_charset = utf8
208216; Complete path to directory to store uploaded files
209217; (This directory should not be directly web-accessible)
210218; Windows users should use forward slashes
211- files_dir = files
219+ files_dir = {{ getenv " OJS_FILES_DIR " }}
212220
213221; Path to the directory to store public uploaded files
214222; (This directory should be web-accessible and the specified path
@@ -379,14 +387,14 @@ results_per_keyword = 500
379387
380388; PDF
381389; 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:]' ' '"
390+ index [application/pdf] = " /usr/bin/pdftotext -enc UTF-8 -nopgbrk %s - | /usr/bin/tr '[:cntrl:]' ' '"
383391
384392; PostScript
385393; 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:]' ' '"
394+ index [application/postscript] = " /usr/bin/ps2ascii %s | /usr/bin/tr '[:cntrl:]' ' '"
387395
388396; Microsoft Word
389- ; index [application/msword] = " /usr/bin/antiword %s "
397+ index [application/msword] = " /usr/bin/antiword %s "
390398; index [application/msword] = " /usr/bin/catdoc %s "
391399
392400
@@ -401,7 +409,7 @@ oai = On
401409
402410; OAI Repository identifier. This setting forms part of OAI-PMH record IDs.
403411; Changing this setting may affect existing clients and is not recommended.
404- repository_id = ojs .pkp.sfu.ca
412+ repository_id = {{ getenv " OJS_OAI_REPOSITORY_ID " }}
405413
406414; Maximum number of records per request to serve via OAI
407415oai_max_records = 100
0 commit comments